Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def encode_file(file_obj, file_type):
|
|
27 |
|
28 |
def generate_response(text_prompt, files):
|
29 |
"""Handles multiple file inputs (images, videos, PDFs)."""
|
30 |
-
url = ENDPOINT.format(project_id=
|
31 |
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
|
32 |
|
33 |
inputs = [{"text": text_prompt}]
|
@@ -71,7 +71,7 @@ interface = Interface(
|
|
71 |
fn=generate_response,
|
72 |
inputs=[
|
73 |
"text",
|
74 |
-
[File(label="Upload Files (Images, Videos, PDFs)", file_types=[".png", ".jpg", ".jpeg", ".mp4", ".mov", ".pdf"],
|
75 |
],
|
76 |
outputs="text",
|
77 |
title="Multimodal Prompt with Gemini 2.0 (Experimental)",
|
|
|
27 |
|
28 |
def generate_response(text_prompt, files):
|
29 |
"""Handles multiple file inputs (images, videos, PDFs)."""
|
30 |
+
url = ENDPOINT.format(project_id=project_id, location=location, model_id=model_id)
|
31 |
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
|
32 |
|
33 |
inputs = [{"text": text_prompt}]
|
|
|
71 |
fn=generate_response,
|
72 |
inputs=[
|
73 |
"text",
|
74 |
+
[File(label="Upload Files (Images, Videos, PDFs)", file_types=[".png", ".jpg", ".jpeg", ".mp4", ".mov", ".pdf"], file_count="multiple")], # Multiple files
|
75 |
],
|
76 |
outputs="text",
|
77 |
title="Multimodal Prompt with Gemini 2.0 (Experimental)",
|