Spaces:
Running
Running
vickeee465
commited on
Commit
·
8cc5141
1
Parent(s):
27dcb52
measure whole process
Browse files- interfaces/manifesto.py +5 -3
interfaces/manifesto.py
CHANGED
@@ -67,9 +67,11 @@ def predict(text, model_id, tokenizer_id):
|
|
67 |
return output_pred, output_info
|
68 |
|
69 |
def predict_cap(text, language):
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
73 |
|
74 |
demo = gr.Interface(
|
75 |
fn=predict_cap,
|
|
|
67 |
return output_pred, output_info
|
68 |
|
69 |
def predict_cap(text, language):
|
70 |
+
with m("WHOLE PROCESS"):
|
71 |
+
model_id = build_huggingface_path(language)
|
72 |
+
tokenizer_id = "xlm-roberta-large"
|
73 |
+
prediction = predict(text, model_id, tokenizer_id)
|
74 |
+
return prediction
|
75 |
|
76 |
demo = gr.Interface(
|
77 |
fn=predict_cap,
|