Spaces:
Build error
Build error
Commit
·
1195aea
1
Parent(s):
59a84ff
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,6 @@ import gradio as gr
|
|
2 |
from network import SpanNet
|
3 |
from huggingface_hub import Repository
|
4 |
|
5 |
-
def greet(name):
|
6 |
-
return "Hello " + name + "!!"
|
7 |
|
8 |
def extract_spannet_scores(path,input_sentence,length, pos_col, task_col):
|
9 |
|
@@ -32,7 +30,7 @@ def pool_span_scores(score_dicts, sent_lens):
|
|
32 |
return r
|
33 |
|
34 |
def predict_label(text):
|
35 |
-
model_path = 'models/
|
36 |
ip = text.split()
|
37 |
ip_len = [len(ip)]
|
38 |
scores = extract_spannet_scores(model_path,ip,ip_len, pos_col=1, task_col=2)
|
|
|
2 |
from network import SpanNet
|
3 |
from huggingface_hub import Repository
|
4 |
|
|
|
|
|
5 |
|
6 |
def extract_spannet_scores(path,input_sentence,length, pos_col, task_col):
|
7 |
|
|
|
30 |
return r
|
31 |
|
32 |
def predict_label(text):
|
33 |
+
model_path = 'models/span.model'
|
34 |
ip = text.split()
|
35 |
ip_len = [len(ip)]
|
36 |
scores = extract_spannet_scores(model_path,ip,ip_len, pos_col=1, task_col=2)
|