gdown fix
Browse files
app.py
CHANGED
|
@@ -6,14 +6,15 @@ from predict import PredictTri
|
|
| 6 |
from gradio import blocks
|
| 7 |
|
| 8 |
output_path = "tashkeela-d2.pt"
|
|
|
|
| 9 |
if not os.path.exists(output_path):
|
| 10 |
model_gdrive_id = "1FGelqImFkESbTyRsx_elkKIOZ9VbhRuo"
|
| 11 |
-
gdown.download(
|
| 12 |
|
| 13 |
output_path = "vocab.vec"
|
| 14 |
if not os.path.exists(output_path):
|
| 15 |
vocab_gdrive_id = "1-0muGvcSYEf8RAVRcwXay4MRex6kmCii"
|
| 16 |
-
gdown.download(
|
| 17 |
|
| 18 |
with open("config.yaml", 'r', encoding="utf-8") as file:
|
| 19 |
config = yaml.load(file, Loader=yaml.FullLoader)
|
|
@@ -33,7 +34,9 @@ with gr.Blocks() as demo:
|
|
| 33 |
## Authors: Muhammad ElNokrashy, Badr AlKhamissi
|
| 34 |
""")
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
|
| 38 |
input_txt = gr.Textbox(
|
| 39 |
placeholder="اكتب هنا",
|
|
|
|
| 6 |
from gradio import blocks
|
| 7 |
|
| 8 |
output_path = "tashkeela-d2.pt"
|
| 9 |
+
gdrive_templ = "https://drive.google.com/file/d/{}/view?usp=sharing"
|
| 10 |
if not os.path.exists(output_path):
|
| 11 |
model_gdrive_id = "1FGelqImFkESbTyRsx_elkKIOZ9VbhRuo"
|
| 12 |
+
gdown.download(gdrive_templ.format(model_gdrive_id), output=output_path, quiet=False)
|
| 13 |
|
| 14 |
output_path = "vocab.vec"
|
| 15 |
if not os.path.exists(output_path):
|
| 16 |
vocab_gdrive_id = "1-0muGvcSYEf8RAVRcwXay4MRex6kmCii"
|
| 17 |
+
gdown.download(gdrive_templ.format(vocab_gdrive_id), output=output_path, quiet=False)
|
| 18 |
|
| 19 |
with open("config.yaml", 'r', encoding="utf-8") as file:
|
| 20 |
config = yaml.load(file, Loader=yaml.FullLoader)
|
|
|
|
| 34 |
## Authors: Muhammad ElNokrashy, Badr AlKhamissi
|
| 35 |
""")
|
| 36 |
|
| 37 |
+
with gr.Row():
|
| 38 |
+
check_box = gr.Checkbox(label="Partial", info="Apply Partial Diacritics or Full Diacritics")
|
| 39 |
+
threshold_txt = gr.Textbox("")
|
| 40 |
|
| 41 |
input_txt = gr.Textbox(
|
| 42 |
placeholder="اكتب هنا",
|