Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ This demo showcases two of the exciting announcements from Google I/O 2025: **Me
|
|
16 |
We use secret tokens to authenticate with Hugging Face and Google’s Gemini APIs. This keeps our access safe and secure.
|
17 |
"""
|
18 |
|
|
|
19 |
from google import genai
|
20 |
from google.genai import types
|
21 |
import os
|
@@ -45,6 +46,7 @@ This function uses MedGemma to generate a plain-language report based on the pro
|
|
45 |
|
46 |
from PIL import Image
|
47 |
|
|
|
48 |
def infer(prompt: str, image: Image.Image, system: str = None) -> str:
|
49 |
image_filename = "image.png"
|
50 |
image.save(image_filename)
|
|
|
16 |
We use secret tokens to authenticate with Hugging Face and Google’s Gemini APIs. This keeps our access safe and secure.
|
17 |
"""
|
18 |
|
19 |
+
import spaces
|
20 |
from google import genai
|
21 |
from google.genai import types
|
22 |
import os
|
|
|
46 |
|
47 |
from PIL import Image
|
48 |
|
49 |
+
@spaces.GPU
|
50 |
def infer(prompt: str, image: Image.Image, system: str = None) -> str:
|
51 |
image_filename = "image.png"
|
52 |
image.save(image_filename)
|