Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,14 +40,12 @@ For more information on `huggingface_hub` Inference API support, please check th
|
|
| 40 |
"""
|
| 41 |
#client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 42 |
import google.generativeai as genai2
|
| 43 |
-
genai2.configure(api_key=os.environ["GOOGLE_API_KEY"]
|
| 44 |
model_gen = genai2.GenerativeModel(model_name="gemini-2.0-flash-thinking-exp",
|
| 45 |
generation_config=generation_config,
|
| 46 |
system_instruction=system_instruction,
|
| 47 |
safety_settings=safety_settings)
|
| 48 |
|
| 49 |
-
)
|
| 50 |
-
|
| 51 |
def model_response(text):
|
| 52 |
response = model_gen.generate_content(text)
|
| 53 |
return response.text
|
|
|
|
| 40 |
"""
|
| 41 |
#client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 42 |
import google.generativeai as genai2
|
| 43 |
+
genai2.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
| 44 |
model_gen = genai2.GenerativeModel(model_name="gemini-2.0-flash-thinking-exp",
|
| 45 |
generation_config=generation_config,
|
| 46 |
system_instruction=system_instruction,
|
| 47 |
safety_settings=safety_settings)
|
| 48 |
|
|
|
|
|
|
|
| 49 |
def model_response(text):
|
| 50 |
response = model_gen.generate_content(text)
|
| 51 |
return response.text
|