Spaces:
Build error
Build error
Commit
·
7916f53
1
Parent(s):
5fa08a0
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import numpy as np
|
3 |
from network import SpanNet
|
4 |
from huggingface_hub import Repository
|
5 |
-
|
6 |
|
7 |
|
8 |
def extract_spannet_scores(path,input_sentence,length, pos_col, task_col):
|
@@ -45,7 +45,10 @@ def temp(text):
|
|
45 |
print('STARTING ..')
|
46 |
# model_path = 'models/span.model'
|
47 |
# model = SpanNet.load_model(model_path)
|
|
|
|
|
48 |
iface = gr.Interface(fn=temp, inputs="text", outputs="text", batch=False)
|
49 |
# iface = gr.Interface(fn=predict_label, inputs="text", outputs="text",auth=True)
|
50 |
iface.launch(share=True, blocked_paths=['models'])
|
51 |
|
|
|
|
2 |
import numpy as np
|
3 |
from network import SpanNet
|
4 |
from huggingface_hub import Repository
|
5 |
+
import os
|
6 |
|
7 |
|
8 |
def extract_spannet_scores(path,input_sentence,length, pos_col, task_col):
|
|
|
45 |
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'])
|
53 |
|
54 |
+
iface.launch(show_api=False)
|