Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,12 @@ genai.configure(api_key=token)
|
|
8 |
model = genai.GenerativeModel(model_name="gemini-pro-vision")
|
9 |
|
10 |
# Fonction pour générer le contenu
|
11 |
-
def generate_content(image):
|
12 |
-
response = model.generate_content([
|
13 |
print(response.text)
|
14 |
e = response.text
|
15 |
return e
|
16 |
|
17 |
# Interface Gradio
|
18 |
-
iface = gr.Interface(fn=generate_content, inputs=gr.Image(type='pil'), outputs="text")
|
19 |
iface.launch(share=True)
|
|
|
8 |
model = genai.GenerativeModel(model_name="gemini-pro-vision")
|
9 |
|
10 |
# Fonction pour générer le contenu
|
11 |
+
def generate_content(pro,image):
|
12 |
+
response = model.generate_content([pro, image])
|
13 |
print(response.text)
|
14 |
e = response.text
|
15 |
return e
|
16 |
|
17 |
# Interface Gradio
|
18 |
+
iface = gr.Interface(fn=generate_content, inputs=[gr.Textbox(),gr.Image(type='pil')], outputs="text")
|
19 |
iface.launch(share=True)
|