vilarin commited on
Commit
4742bbe
·
verified ·
1 Parent(s): 26414d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -68,7 +68,7 @@ def process_text(text_input, unit):
68
  )
69
  return completion.choices[0].message.content
70
  elif text_input and endpoints == "GOOGLE":
71
- genai.configure(api_key=GOOGLE_API_KEY)
72
  model = genai.GenerativeModel(MODEL),
73
  response = model.generate_content(f" You are a experienced {unit} doctor." + SYS_PROMPT + f"Could you solve {text_input}?")
74
  return response.text
@@ -104,7 +104,7 @@ def process_image(image_input, unit):
104
  )
105
  return response.choices[0].message.content
106
  elif image_input is not None and ENDPOINTS == "GOOGLE":
107
- genai.configure(api_key=GOOGLE_API_KEY)
108
  model = genai.GenerativeModel(MODEL),
109
  response = model.generate_content([f" You are a experienced {unit} doctor." + SYS_PROMPT + "Help me understand what is in this picture and analysis.", image_input])
110
  return response.text
 
68
  )
69
  return completion.choices[0].message.content
70
  elif text_input and endpoints == "GOOGLE":
71
+ genai.configure(api_key=api_key)
72
  model = genai.GenerativeModel(MODEL),
73
  response = model.generate_content(f" You are a experienced {unit} doctor." + SYS_PROMPT + f"Could you solve {text_input}?")
74
  return response.text
 
104
  )
105
  return response.choices[0].message.content
106
  elif image_input is not None and ENDPOINTS == "GOOGLE":
107
+ genai.configure(api_key=api_key)
108
  model = genai.GenerativeModel(MODEL),
109
  response = model.generate_content([f" You are a experienced {unit} doctor." + SYS_PROMPT + "Help me understand what is in this picture and analysis.", image_input])
110
  return response.text