m3n99 commited on
Commit
fe571f2
Β·
1 Parent(s): 44e509d

fix bug again

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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", theme=gr.themes.Base()) as demo:
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 &amp; 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 &amp; Google Gemini"
557
  "</center>"
558
  )
559