Spaces:
Runtime error
Runtime error
Ali Abuharb
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,28 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import gradio as gr
|
| 3 |
-
|
| 4 |
-
hf_key = os.environ.get('HF_TOKEN', None)
|
| 5 |
-
username = os.environ.get('USERNAME', None)
|
| 6 |
-
password = os.environ.get('PASSWORD', None)
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
)
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
hf_key = os.environ.get('HF_TOKEN', None)
|
| 5 |
+
username = os.environ.get('USERNAME', None)
|
| 6 |
+
password = os.environ.get('PASSWORD', None)
|
| 7 |
+
|
| 8 |
+
theme = gr.themes.Soft(
|
| 9 |
+
font=[gr.themes.GoogleFont('Tajawal'), 'Tajawal', 'Tajawal', 'Tajawal'],
|
| 10 |
+
font_mono=[gr.themes.GoogleFont('Tajawal'), 'Tajawal', 'Tajawal', 'Tajawal'],
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
css = """
|
| 14 |
+
#title {text-align: center;}
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
with gr.Blocks(title='SaudiLawsMind', theme=theme, fill_height=True, fill_width=False, css=css) as app:
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
gr.load("DatuMind/SaudiLawsMind_Private", hf_token = hf_key, src = "spaces")
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
app.queue().launch(
|
| 24 |
+
auth=(username,password),
|
| 25 |
+
auth_message='خبير الأنظمة السعودية - SaudiLawsMind',
|
| 26 |
+
enable_monitoring=True,
|
| 27 |
+
show_api=False,
|
| 28 |
)
|