Vihang28 commited on
Commit
54199b5
·
verified ·
1 Parent(s): 2e855ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,8 +30,8 @@ def api_calling(image, prompt, api_key):
30
  if len(prompt) == 0:
31
  # prompt = "I want you to act as a friendly tile setters who has 10 years of experience with floor tiling. I want to get the dirty tiles replaced and as I will be charged on per tile basis so the tile setter wants to know the exact number of tiles that needs replacement so that they could estimate the pricing so I will share an image of floor with you and you will reply to me with the number of tiles that need cleaning. Reply with the number of tiles only with as much accuracy as possible. I want you to keep the reply neat, limiting the reply to less than 40 words in English."
32
  # prompt = "I want you to act as a friendly tile setters who has 10 years of experience with floor tiling. I will share an image of floor with you and you will reply to me with the number of tiles that need cleaning, if tiles appear clean then you can reply with the fixed answer 'All tiles are clean'. Reply with accuracy and compassion. I want you to keep the reply neat, limiting the reply to 40 words in English."
33
- prompt = "I want you to act as a friendly tile setters who has 10 years of experience with floor tiling. I want the dirty tiles to be replaced and rest tiles to be cleaned and as I will be charged on per tile basis so the tile setter wants to know the exact number of tiles that needs replacement and cleaning so that they could estimate the pricing. I will share an image of floor with you and you will reply to me with the number of tiles that need replacement and cleaning. Calculation will be as follows: 1) Number of tiles need replacement = Total number of dirty tiles in the image, 2) Number of tiles need cleaning = (Total number of tiles in the image - Number of tiles need replacement). Reply with the number of tiles only with as much accuracy as possible. I want you to keep the reply neat, limiting the reply to less than 40 words in English."
34
-
35
  headers = {
36
  "Content-Type": "application/json",
37
  "Authorization": f"Bearer {api_key}"
 
30
  if len(prompt) == 0:
31
  # prompt = "I want you to act as a friendly tile setters who has 10 years of experience with floor tiling. I want to get the dirty tiles replaced and as I will be charged on per tile basis so the tile setter wants to know the exact number of tiles that needs replacement so that they could estimate the pricing so I will share an image of floor with you and you will reply to me with the number of tiles that need cleaning. Reply with the number of tiles only with as much accuracy as possible. I want you to keep the reply neat, limiting the reply to less than 40 words in English."
32
  # prompt = "I want you to act as a friendly tile setters who has 10 years of experience with floor tiling. I will share an image of floor with you and you will reply to me with the number of tiles that need cleaning, if tiles appear clean then you can reply with the fixed answer 'All tiles are clean'. Reply with accuracy and compassion. I want you to keep the reply neat, limiting the reply to 40 words in English."
33
+ prompt = "I want you to act as a friendly tile setters who has 10 years of experience with floor tiling. I want the dirty tiles to be replaced and rest tiles to be cleaned and as I will be charged on per tile basis so the tile setter wants to know the exact number of tiles that needs replacement and cleaning so that they could estimate the pricing. I will share an image of floor with you and you will reply to me with the number of tiles that need replacement and cleaning. So the dirty tiles will be the one's needing replacement and remaining tiles will need cleaning. Reply with the number of tiles only with as much accuracy as possible. I want you to keep the reply neat, limiting the reply to less than 40 words in English."
34
+
35
  headers = {
36
  "Content-Type": "application/json",
37
  "Authorization": f"Bearer {api_key}"