nehalelkaref commited on
Commit
28502e7
·
1 Parent(s): 90c1d8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import numpy as np
3
- from flat-arabic-entity-classification.network import SpanNet
4
- from huggingface_hub import Repository
5
  import os
6
 
7
 
@@ -46,7 +46,10 @@ print('STARTING ..')
46
  # model_path = 'models/span.model'
47
  # model = SpanNet.load_model(model_path)
48
  space_key = os.environ.get('key')
49
- gr.load(name="nehalelkaref/flat-arabic-entity-classification", hf_token=space_key, src='spaces')
 
 
 
50
  iface = gr.Interface(fn=temp, inputs="text", outputs="text", batch=False)
51
  # iface = gr.Interface(fn=predict_label, inputs="text", outputs="text",auth=True)
52
  iface.launch(share=True, blocked_paths=['models'])
 
1
  import gradio as gr
2
  import numpy as np
3
+
4
+ from huggingface_hub import hf_hub_download
5
  import os
6
 
7
 
 
46
  # model_path = 'models/span.model'
47
  # model = SpanNet.load_model(model_path)
48
  space_key = os.environ.get('key')
49
+ hf_hub_download(repo_id="nehalelkaref/stagedNER", token=space_key)
50
+ from network import SpanNet
51
+
52
+ # gr.load(name="nehalelkaref/flat-arabic-entity-classification", hf_token=space_key, src='spaces')
53
  iface = gr.Interface(fn=temp, inputs="text", outputs="text", batch=False)
54
  # iface = gr.Interface(fn=predict_label, inputs="text", outputs="text",auth=True)
55
  iface.launch(share=True, blocked_paths=['models'])