Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -145,11 +145,13 @@ def pipeline(text, file, n, lang):
|
|
| 145 |
# ====== واجهة Gradio ======
|
| 146 |
theme = gr.themes.Soft()
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
-
with
|
| 150 |
-
css = f.read()
|
| 151 |
-
|
| 152 |
-
with gr.Blocks(theme=theme, css=css, fill_body=True) as demo:
|
| 153 |
gr.HTML("<style>body{direction:rtl}</style>")
|
| 154 |
gr.Markdown("## 🧠 مولّد أسئلة اختيار من متعدد (PDF / TXT / نص)")
|
| 155 |
with gr.Row():
|
|
|
|
| 145 |
# ====== واجهة Gradio ======
|
| 146 |
theme = gr.themes.Soft()
|
| 147 |
|
| 148 |
+
try:
|
| 149 |
+
with open("styles.css","r",encoding="utf-8") as f:
|
| 150 |
+
css = f.read()
|
| 151 |
+
except FileNotFoundError:
|
| 152 |
+
css = ""
|
| 153 |
|
| 154 |
+
with gr.Blocks(theme=theme, css=css) as demo:
|
|
|
|
|
|
|
|
|
|
| 155 |
gr.HTML("<style>body{direction:rtl}</style>")
|
| 156 |
gr.Markdown("## 🧠 مولّد أسئلة اختيار من متعدد (PDF / TXT / نص)")
|
| 157 |
with gr.Row():
|