Dunateo
commited on
Commit
·
0517bb5
1
Parent(s):
d11d1ee
fix pb with label dict
Browse files
app.py
CHANGED
|
@@ -25,10 +25,11 @@ if __name__ == '__main__':
|
|
| 25 |
|
| 26 |
# get the dict file
|
| 27 |
label_dict_file = hf_hub_download(repo_id=model_path, filename="label_dict.json")
|
| 28 |
-
|
| 29 |
global label_dict
|
| 30 |
with open(label_dict_file, "r") as f:
|
| 31 |
-
|
|
|
|
| 32 |
|
| 33 |
# gradio specific to create an IHM
|
| 34 |
iface = gr.Interface(
|
|
|
|
| 25 |
|
| 26 |
# get the dict file
|
| 27 |
label_dict_file = hf_hub_download(repo_id=model_path, filename="label_dict.json")
|
| 28 |
+
|
| 29 |
global label_dict
|
| 30 |
with open(label_dict_file, "r") as f:
|
| 31 |
+
content = f.read()
|
| 32 |
+
label_dict = json.loads(content)
|
| 33 |
|
| 34 |
# gradio specific to create an IHM
|
| 35 |
iface = gr.Interface(
|