Spaces:
Sleeping
Sleeping
fix a bug
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("""
|
|
@@ -564,4 +564,4 @@ with gr.Blocks(title="Prompt2Project", css=CSS, theme=gr.themes.Base()) as demo:
|
|
| 564 |
)
|
| 565 |
|
| 566 |
if __name__ == "__main__":
|
| 567 |
-
demo.launch()
|
|
|
|
| 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 |
footer { display: none !important; }
|
| 503 |
"""
|
| 504 |
|
| 505 |
+
with gr.Blocks(title="Prompt2Project", theme=gr.themes.Base()) as demo:
|
| 506 |
|
| 507 |
# ββ Header ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 508 |
gr.HTML("""
|
|
|
|
| 564 |
)
|
| 565 |
|
| 566 |
if __name__ == "__main__":
|
| 567 |
+
demo.launch(css=CSS)
|