Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -63,11 +63,38 @@ def generate_topics(field, major, keywords, audience, level):
|
|
63 |
except Exception as e:
|
64 |
return f"<div style='color: red;'>❌ خطا در تماس با مدل DeepSeek: {e}</div>"
|
65 |
|
66 |
-
#
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
gr.Markdown("## 🎓 پیشنهادگر موضوع پایاننامه کاسپین")
|
72 |
|
73 |
with gr.Row():
|
|
|
63 |
except Exception as e:
|
64 |
return f"<div style='color: red;'>❌ خطا در تماس با مدل DeepSeek: {e}</div>"
|
65 |
|
66 |
+
# CSS سفارشی برای بکگراند سفید و متن مشکی
|
67 |
+
custom_css = """
|
68 |
+
/* پسزمینه کلی سفید و متن مشکی */
|
69 |
+
body, .gradio-container {
|
70 |
+
background-color: white !important;
|
71 |
+
color: black !important;
|
72 |
+
}
|
73 |
+
|
74 |
+
/* استایل ورودیها و دکمهها */
|
75 |
+
input, textarea, select, button {
|
76 |
+
background-color: white !important;
|
77 |
+
color: black !important;
|
78 |
+
border: 1px solid #ccc !important;
|
79 |
+
}
|
80 |
+
|
81 |
+
/* استایل HTML خروجی */
|
82 |
+
#output_box {
|
83 |
+
background-color: white !important;
|
84 |
+
color: black !important;
|
85 |
+
}
|
86 |
|
87 |
+
/* برداشتن تم تیره Gradio */
|
88 |
+
.gradio-container.dark {
|
89 |
+
background-color: white !important;
|
90 |
+
color: black !important;
|
91 |
+
}
|
92 |
+
"""
|
93 |
+
|
94 |
+
with gr.Blocks(css=custom_css, theme="default") as app:
|
95 |
+
# لوگوی شما
|
96 |
+
gr.Image(value="logo.png", interactive=False, show_label=False)
|
97 |
+
# عنوان
|
98 |
gr.Markdown("## 🎓 پیشنهادگر موضوع پایاننامه کاسپین")
|
99 |
|
100 |
with gr.Row():
|