Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import BlipForQuestionAnswering, AutoProcessor # For the pre-trained VQA model and processor
|
2 |
+
from PIL import Image # For image handling
|
3 |
+
import gradio as gr # For creating the interface
|
4 |
+
from gtts import gTTS # For converting text to speech
|
5 |
+
import os # For file handling
|
6 |
+
|
7 |
+
# Load the model and processor from Hugging Face
|
8 |
+
model = BlipForQuestionAnswering.from_pretrained("Salesforce/blip-vqa-base")
|
9 |
+
processor = AutoProcessor.from_pretrained("Salesforce/blip-vqa-base")
|
10 |
+
|