Spaces:
Running
Running
Francisco Cerna Fukuzaki
commited on
Commit
·
ca2b7ea
1
Parent(s):
30152ea
Commit
Browse files
app.py
CHANGED
@@ -48,6 +48,8 @@ model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', force_rel
|
|
48 |
#model = torch.hub.load('path/to/yolov5', 'custom', path='/content/yolov56.pt', source='local') # local repo
|
49 |
|
50 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
|
|
|
|
51 |
|
52 |
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "datasets/AllAideas/demo-iazika-flags")
|
53 |
|
@@ -99,7 +101,6 @@ iface = gr.Interface(yolo,
|
|
99 |
theme="huggingface",
|
100 |
analytics_enabled=False,
|
101 |
allow_flagging="manual",
|
102 |
-
flagging_options=["correcto", "incorrecto", "casi correcto", "error", "otro"],
|
103 |
flagging_callback=hf_writer
|
104 |
).launch(enable_queue=True,debug=True)
|
105 |
|
|
|
48 |
#model = torch.hub.load('path/to/yolov5', 'custom', path='/content/yolov56.pt', source='local') # local repo
|
49 |
|
50 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
51 |
+
os.environ["HF_DATASETS_OFFLINE"] = 1
|
52 |
+
os.environ["TRANSFORMERS_OFFLINE"] = 1
|
53 |
|
54 |
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "datasets/AllAideas/demo-iazika-flags")
|
55 |
|
|
|
101 |
theme="huggingface",
|
102 |
analytics_enabled=False,
|
103 |
allow_flagging="manual",
|
|
|
104 |
flagging_callback=hf_writer
|
105 |
).launch(enable_queue=True,debug=True)
|
106 |
|