Spaces:
Running
Running
gradio upgrade 5.8
Browse files- README.md +1 -1
- app.py +15 -12
- requirements.txt +2 -4
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 📚
|
|
4 |
colorFrom: red
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: red
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.8.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
CHANGED
@@ -2391,8 +2391,12 @@ CSS = """
|
|
2391 |
.accordion-prompts {
|
2392 |
background-color: orange;
|
2393 |
}
|
|
|
|
|
|
|
2394 |
"""
|
2395 |
|
|
|
2396 |
english_header_init_btn_js = """
|
2397 |
document.getElementById("english_grapragh_practice_row").style.display = "none";
|
2398 |
document.getElementById("english_grapragh_evaluate_row").style.display = "none";
|
@@ -2437,14 +2441,13 @@ english_logs_tab_button_js = f"""
|
|
2437 |
"""
|
2438 |
|
2439 |
THEME = gr.themes.Glass(
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
)
|
2448 |
|
2449 |
with gr.Blocks(theme=THEME, css=CSS) as demo:
|
2450 |
|
@@ -2472,13 +2475,13 @@ with gr.Blocks(theme=THEME, css=CSS) as demo:
|
|
2472 |
""")
|
2473 |
with gr.Row():
|
2474 |
with gr.Column():
|
2475 |
-
english_grapragh_practice_button = gr.Button("📝 英文段落寫作練習", variant="primary", elem_id="english_grapragh_practice_button")
|
2476 |
with gr.Column():
|
2477 |
-
english_grapragh_evaluate_button = gr.Button("📊 英文段落寫作評分", variant="", elem_id="english_grapragh_evaluate_button")
|
2478 |
with gr.Column():
|
2479 |
-
english_exam_practice_tab_button = gr.Button("🎯 英文考古題寫作練習", variant="", elem_id="english_exam_practice_tab_button")
|
2480 |
with gr.Column():
|
2481 |
-
english_logs_tab_button = gr.Button("📚 歷程回顧", variant="", elem_id="english_logs_tab_button")
|
2482 |
# ===== 英文段落寫作練習 =====
|
2483 |
with gr.Row(visible=True, elem_id="english_grapragh_practice_row") as english_grapragh_practice_row:
|
2484 |
with gr.Column():
|
|
|
2391 |
.accordion-prompts {
|
2392 |
background-color: orange;
|
2393 |
}
|
2394 |
+
.selector-button {
|
2395 |
+
border: 1px solid gray;
|
2396 |
+
}
|
2397 |
"""
|
2398 |
|
2399 |
+
|
2400 |
english_header_init_btn_js = """
|
2401 |
document.getElementById("english_grapragh_practice_row").style.display = "none";
|
2402 |
document.getElementById("english_grapragh_evaluate_row").style.display = "none";
|
|
|
2441 |
"""
|
2442 |
|
2443 |
THEME = gr.themes.Glass(
|
2444 |
+
primary_hue=gr.themes.colors.blue,
|
2445 |
+
secondary_hue=gr.themes.colors.sky,
|
2446 |
+
text_size=gr.themes.sizes.text_lg
|
2447 |
+
).set(
|
2448 |
+
button_primary_background_fill="*primary_200",
|
2449 |
+
button_primary_background_fill_hover="*primary_300",
|
2450 |
+
)
|
|
|
2451 |
|
2452 |
with gr.Blocks(theme=THEME, css=CSS) as demo:
|
2453 |
|
|
|
2475 |
""")
|
2476 |
with gr.Row():
|
2477 |
with gr.Column():
|
2478 |
+
english_grapragh_practice_button = gr.Button("📝 英文段落寫作練習", variant="primary", elem_id="english_grapragh_practice_button", elem_classes="selector-button")
|
2479 |
with gr.Column():
|
2480 |
+
english_grapragh_evaluate_button = gr.Button("📊 英文段落寫作評分", variant="", elem_id="english_grapragh_evaluate_button", elem_classes="selector-button")
|
2481 |
with gr.Column():
|
2482 |
+
english_exam_practice_tab_button = gr.Button("🎯 英文考古題寫作練習", variant="", elem_id="english_exam_practice_tab_button", elem_classes="selector-button")
|
2483 |
with gr.Column():
|
2484 |
+
english_logs_tab_button = gr.Button("📚 歷程回顧", variant="", elem_id="english_logs_tab_button", elem_classes="selector-button")
|
2485 |
# ===== 英文段落寫作練習 =====
|
2486 |
with gr.Row(visible=True, elem_id="english_grapragh_practice_row") as english_grapragh_practice_row:
|
2487 |
with gr.Column():
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
gradio==
|
2 |
openai>=1.16.2
|
3 |
python-docx
|
4 |
google-api-python-client
|
@@ -6,6 +6,4 @@ google-auth-httplib2
|
|
6 |
google-auth-oauthlib
|
7 |
google-cloud-storage
|
8 |
google-cloud-bigquery
|
9 |
-
vertexai
|
10 |
-
|
11 |
-
fastapi==0.112.2
|
|
|
1 |
+
gradio==5.8.0
|
2 |
openai>=1.16.2
|
3 |
python-docx
|
4 |
google-api-python-client
|
|
|
6 |
google-auth-oauthlib
|
7 |
google-cloud-storage
|
8 |
google-cloud-bigquery
|
9 |
+
vertexai
|
|
|
|