rishiraj commited on
Commit
203c01e
·
verified ·
1 Parent(s): ba62ec1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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)