Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Ubuntu
commited on
Commit
·
a2d00bf
1
Parent(s):
2eea2fb
Add label
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def process(text, top_k=5):
|
|
21 |
pred = p(text, top_k=top_k)
|
22 |
tock = time.time()
|
23 |
scores = {x["label"]: x["score"] for x in pred}
|
24 |
-
msg = f'
|
25 |
return scores, msg
|
26 |
|
27 |
|
@@ -30,7 +30,7 @@ input_text = gr.Text(label="Enter text")
|
|
30 |
|
31 |
# Gradio outputs
|
32 |
labels = gr.Label(label="Languages", num_top_classes=5)
|
33 |
-
output_text = gr.Text()
|
34 |
|
35 |
description = "This Space lets you perform language identification on the 102 languages present in the google/fleurs dataset. The underlying model scores 99.3% accuracy on the validation set. Inference is optimized with Optimum Intel and OpenVINO."
|
36 |
|
|
|
21 |
pred = p(text, top_k=top_k)
|
22 |
tock = time.time()
|
23 |
scores = {x["label"]: x["score"] for x in pred}
|
24 |
+
msg = f'{(tock-tick)*1000:.2f} milliseconds'
|
25 |
return scores, msg
|
26 |
|
27 |
|
|
|
30 |
|
31 |
# Gradio outputs
|
32 |
labels = gr.Label(label="Languages", num_top_classes=5)
|
33 |
+
output_text = gr.Text(label="Predition time")
|
34 |
|
35 |
description = "This Space lets you perform language identification on the 102 languages present in the google/fleurs dataset. The underlying model scores 99.3% accuracy on the validation set. Inference is optimized with Optimum Intel and OpenVINO."
|
36 |
|