Monimoy commited on
Commit
64adb8d
·
verified ·
1 Parent(s): d7a08c3

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +4 -14
  2. requirements.txt +2 -1
app.py CHANGED
@@ -112,23 +112,13 @@ iface = gr.Interface(
112
  title="Image Question Answering with Phi-3 and SigLIP (CPU)",
113
  description="Ask questions about an image and get answers powered by Phi-3 (llama.cpp) and SigLIP.",
114
  examples=[
115
- ["example_image_1.jpg", "What color is the car?"],
116
- ["example_image_2.jpg", "How many people are in the image?"],
117
- ["example_image_3.jpg", "What is the person doing?"]
 
118
  ]
119
  )
120
 
121
  # 5. Launch the App
122
  if __name__ == "__main__":
123
- # Create dummy example images
124
- if not os.path.exists("example_image_1.jpg"):
125
- dummy_image = Image.new("RGB", (224, 224), color="red")
126
- dummy_image.save("example_image_1.jpg")
127
- if not os.path.exists("example_image_2.jpg"):
128
- dummy_image = Image.new("RGB", (224, 224), color="green")
129
- dummy_image.save("example_image_2.jpg")
130
- if not os.path.exists("example_image_3.jpg"):
131
- dummy_image = Image.new("RGB", (224, 224), color="blue")
132
- dummy_image.save("example_image_3.jpg")
133
-
134
  iface.launch()
 
112
  title="Image Question Answering with Phi-3 and SigLIP (CPU)",
113
  description="Ask questions about an image and get answers powered by Phi-3 (llama.cpp) and SigLIP.",
114
  examples=[
115
+ ["cat_0006.png", "Create a interesting story about this image?"],
116
+ ["bird_0004.png", "Can you describe this image?"],
117
+ ["truck_0003.png", "Elaborate the setting of the image"],
118
+ ["ship_0007.png", "Explain the purpose of image"]
119
  ]
120
  )
121
 
122
  # 5. Launch the App
123
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
 
 
 
124
  iface.launch()
requirements.txt CHANGED
@@ -4,4 +4,5 @@ torchvision
4
  timm
5
  Pillow
6
  transformers
7
- llama-cpp-python
 
 
4
  timm
5
  Pillow
6
  transformers
7
+ llama-cpp-python
8
+ peft