Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ dtype = torch.float16 if device.type == "cuda" else torch.float32
|
|
104 |
|
105 |
# GEMMA3-4B MULTIMODAL MODEL
|
106 |
|
107 |
-
gemma3_model_id = "google/gemma-3-
|
108 |
gemma3_model = Gemma3ForConditionalGeneration.from_pretrained(
|
109 |
gemma3_model_id, device_map="auto"
|
110 |
).eval()
|
@@ -311,6 +311,7 @@ demo = gr.ChatInterface(
|
|
311 |
],
|
312 |
examples=[
|
313 |
[{"text": "@gemma3 Explain the Image", "files": ["examples/3.jpg"]}],
|
|
|
314 |
[{"text": "@gemma3 Transcription of the letter", "files": ["examples/222.png"]}],
|
315 |
[{"text": "@video-infer Explain the content of the Advertisement", "files": ["examples/videoplayback.mp4"]}],
|
316 |
[{"text": "@video-infer Explain the content of the video in detail", "files": ["examples/breakfast.mp4"]}],
|
@@ -319,6 +320,7 @@ demo = gr.ChatInterface(
|
|
319 |
[{"text": "@video-infer Summarize the events in this video", "files": ["examples/sky.mp4"]}],
|
320 |
[{"text": "@video-infer What is in the video ?", "files": ["examples/redlight.mp4"]}],
|
321 |
["Python Program for Array Rotation"],
|
|
|
322 |
],
|
323 |
cache_examples=False,
|
324 |
type="messages",
|
|
|
104 |
|
105 |
# GEMMA3-4B MULTIMODAL MODEL
|
106 |
|
107 |
+
gemma3_model_id = "google/gemma-3-4b-it" # alternative: google/gemma-3-12b-it
|
108 |
gemma3_model = Gemma3ForConditionalGeneration.from_pretrained(
|
109 |
gemma3_model_id, device_map="auto"
|
110 |
).eval()
|
|
|
311 |
],
|
312 |
examples=[
|
313 |
[{"text": "@gemma3 Explain the Image", "files": ["examples/3.jpg"]}],
|
314 |
+
["@gemma3 Explain Critical Temperature of Substance"]
|
315 |
[{"text": "@gemma3 Transcription of the letter", "files": ["examples/222.png"]}],
|
316 |
[{"text": "@video-infer Explain the content of the Advertisement", "files": ["examples/videoplayback.mp4"]}],
|
317 |
[{"text": "@video-infer Explain the content of the video in detail", "files": ["examples/breakfast.mp4"]}],
|
|
|
320 |
[{"text": "@video-infer Summarize the events in this video", "files": ["examples/sky.mp4"]}],
|
321 |
[{"text": "@video-infer What is in the video ?", "files": ["examples/redlight.mp4"]}],
|
322 |
["Python Program for Array Rotation"],
|
323 |
+
["@gemma3 Explain Critical Temperature of Substance"]
|
324 |
],
|
325 |
cache_examples=False,
|
326 |
type="messages",
|