ManishThota commited on
Commit
b1c675e
1 Parent(s): ee0b20a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -28
app.py CHANGED
@@ -103,48 +103,47 @@ def predict_answer(video, image, question):
103
  else:
104
  return "Unsupported file type. Please upload an image or video."
105
 
106
- promt_cat_dog = """Annotate this image with this schema:
107
- {
 
108
  “description”: “Is there a cat in the image?”,
109
  “value”: “Cat”
110
- },
111
- {
112
  “description”: “Is there a dog in the image?”,
113
- “value”: “Dog
114
- },
115
- {
116
  “description”: “Is there a horse in the image?”,
117
- “value”: “Horse
118
- },
119
-
120
- provide me the answers as a dictionary with key as the string value of the variable value on top and its value should be 0 if it is Flase, else 1 if its is True
121
- """
122
  promt_bus_people = """
123
- Annotate this image with this schema:
124
- {
125
  “description”: “Is there a bus in the image?”,
126
- “value”: “Bus
127
- },
128
- {
129
  “description”: “Is there a bike in the image?”,
130
  “value”: “Bike”,
131
- },
132
-
133
- provide me the answers as a dictionary with key as the string value of the variable value on top and its value should be 0 if it is Flase, else 1 if its is True
134
- """
135
 
136
  promt_video = """
137
- Annotate this image with this schema:
138
- {
139
  “description”: “Is the person standing?”,
140
  “value”: “Standing”,
141
- },
142
- {
143
  “description”: “Is the person's hands free?”,
144
  “value”: “Hands-Free”,
145
- },
146
- provide me the answers as a dictionary with key as the string value of the variable value on top and its value should be 0 if it is Flase, else 1 if its is True
147
- """
148
  test_examples = [[None, "Images/cat_dog.jpeg", promt_cat_dog],
149
  [None,"Images/bus_people.jpeg", promt_bus_people],
150
  ["videos/v2.mp4",None,promt_video],
 
103
  else:
104
  return "Unsupported file type. Please upload an image or video."
105
 
106
+ promt_cat_dog = """
107
+ Annotate this image with this schema:
108
+ {
109
  “description”: “Is there a cat in the image?”,
110
  “value”: “Cat”
111
+ },
112
+ {
113
  “description”: “Is there a dog in the image?”,
114
+ “value”: “Dog”,
115
+ },
116
+ {
117
  “description”: “Is there a horse in the image?”,
118
+ “value”: “Horse”,
119
+ },
120
+ provide me the answers as a dictionary with key as the string value of the variable value on top and its value should be boolean value
121
+ """
 
122
  promt_bus_people = """
123
+ Annotate this image with this schema:
124
+ {
125
  “description”: “Is there a bus in the image?”,
126
+ “value”: “Bus”,
127
+ },
128
+ {
129
  “description”: “Is there a bike in the image?”,
130
  “value”: “Bike”,
131
+ },
132
+ provide me the answers as a dictionary with key as the string value of the variable value on top and its value should be boolean value
133
+ """
 
134
 
135
  promt_video = """
136
+ Annotate this image with this schema:
137
+ {
138
  “description”: “Is the person standing?”,
139
  “value”: “Standing”,
140
+ },
141
+ {
142
  “description”: “Is the person's hands free?”,
143
  “value”: “Hands-Free”,
144
+ },
145
+ provide me the answers as a dictionary with key as the string value of the variable value on top and its value should be boolean value
146
+ """
147
  test_examples = [[None, "Images/cat_dog.jpeg", promt_cat_dog],
148
  [None,"Images/bus_people.jpeg", promt_bus_people],
149
  ["videos/v2.mp4",None,promt_video],