Spaces:
Sleeping
Sleeping
fix bug again
Browse files
app.py
CHANGED
|
@@ -215,7 +215,7 @@ def call_gemini(topic: str, level: str, difficulty: int) -> str:
|
|
| 215 |
|
| 216 |
client = genai.Client(api_key=GEMINI_API_KEY)
|
| 217 |
response = client.models.generate_content(
|
| 218 |
-
model="gemini-2.0-flash",
|
| 219 |
contents=build_user_prompt(topic, level, difficulty),
|
| 220 |
config=types.GenerateContentConfig(
|
| 221 |
system_instruction=SYSTEM_PROMPT,
|
|
@@ -502,7 +502,7 @@ body, .gradio-container {
|
|
| 502 |
footer { display: none !important; }
|
| 503 |
"""
|
| 504 |
|
| 505 |
-
with gr.Blocks(title="Prompt2Project"
|
| 506 |
|
| 507 |
# ββ Header ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 508 |
gr.HTML("""
|
|
@@ -553,7 +553,7 @@ with gr.Blocks(title="Prompt2Project", theme=gr.themes.Base()) as demo:
|
|
| 553 |
# ββ Footer ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 554 |
gr.HTML(
|
| 555 |
"<center style='color:#444;font-size:0.8rem;margin-top:0.5rem;padding-bottom:1rem;'>"
|
| 556 |
-
"Built with β€οΈ using Gradio & Google Gemini"
|
| 557 |
"</center>"
|
| 558 |
)
|
| 559 |
|
|
|
|
| 215 |
|
| 216 |
client = genai.Client(api_key=GEMINI_API_KEY)
|
| 217 |
response = client.models.generate_content(
|
| 218 |
+
model="gemini-2.0-flash", # β fixed: was "gemini-1.5-flash" (404)
|
| 219 |
contents=build_user_prompt(topic, level, difficulty),
|
| 220 |
config=types.GenerateContentConfig(
|
| 221 |
system_instruction=SYSTEM_PROMPT,
|
|
|
|
| 502 |
footer { display: none !important; }
|
| 503 |
"""
|
| 504 |
|
| 505 |
+
with gr.Blocks(title="Prompt2Project") as demo:
|
| 506 |
|
| 507 |
# ββ Header ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 508 |
gr.HTML("""
|
|
|
|
| 553 |
# ββ Footer ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 554 |
gr.HTML(
|
| 555 |
"<center style='color:#444;font-size:0.8rem;margin-top:0.5rem;padding-bottom:1rem;'>"
|
| 556 |
+
"Built with β€οΈ from Maen, using Gradio & Google Gemini"
|
| 557 |
"</center>"
|
| 558 |
)
|
| 559 |
|