Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,11 @@ examples = [
|
|
11 |
]
|
12 |
|
13 |
models = [
|
|
|
14 |
"sinonimayzer/UzRoBERTa-v2",
|
|
|
|
|
15 |
"tahrirchi/tahrirchi-bert-base",
|
16 |
-
"rifkat/uztext-3Gb-BPE-Roberta"
|
17 |
]
|
18 |
|
19 |
def df(arr):
|
@@ -26,7 +28,7 @@ def fn(text):
|
|
26 |
arr = []
|
27 |
for model in models:
|
28 |
arr.append(df(pipeline("fill-mask", model=model)(text)))
|
29 |
-
return arr[0], arr[1], arr[2]
|
30 |
|
31 |
with gr.Blocks() as demo:
|
32 |
with gr.Row():
|
@@ -34,13 +36,17 @@ with gr.Blocks() as demo:
|
|
34 |
output0 = gr.Label(label=models[0])
|
35 |
with gr.Column():
|
36 |
output1 = gr.Label(label=models[1])
|
|
|
|
|
37 |
with gr.Row():
|
38 |
with gr.Column():
|
39 |
-
output2 = gr.Label(label=models[
|
|
|
|
|
40 |
with gr.Column():
|
41 |
input = gr.Textbox(label="Input", value=examples[0], lines=8, max_lines=8)
|
42 |
btn = gr.Button("Check")
|
43 |
-
gr.Examples(examples, fn=fn, inputs=[input], outputs=[output0, output1, output2], cache_examples=True, batch=True)
|
44 |
-
btn.click(fn, inputs=[input], outputs=[output0, output1, output2])
|
45 |
if __name__ == "__main__":
|
46 |
demo.queue().launch()
|
|
|
11 |
]
|
12 |
|
13 |
models = [
|
14 |
+
"sinonimayzer/UzRoBERTa-v1",
|
15 |
"sinonimayzer/UzRoBERTa-v2",
|
16 |
+
"sinonimayzer/UzRoBERTa-v3",
|
17 |
+
"rifkat/uztext-3Gb-BPE-Roberta",
|
18 |
"tahrirchi/tahrirchi-bert-base",
|
|
|
19 |
]
|
20 |
|
21 |
def df(arr):
|
|
|
28 |
arr = []
|
29 |
for model in models:
|
30 |
arr.append(df(pipeline("fill-mask", model=model)(text)))
|
31 |
+
return arr[0], arr[1], arr[2], arr[3], arr[4]
|
32 |
|
33 |
with gr.Blocks() as demo:
|
34 |
with gr.Row():
|
|
|
36 |
output0 = gr.Label(label=models[0])
|
37 |
with gr.Column():
|
38 |
output1 = gr.Label(label=models[1])
|
39 |
+
with gr.Column():
|
40 |
+
output1 = gr.Label(label=models[2])
|
41 |
with gr.Row():
|
42 |
with gr.Column():
|
43 |
+
output2 = gr.Label(label=models[3])
|
44 |
+
with gr.Column():
|
45 |
+
output2 = gr.Label(label=models[4])
|
46 |
with gr.Column():
|
47 |
input = gr.Textbox(label="Input", value=examples[0], lines=8, max_lines=8)
|
48 |
btn = gr.Button("Check")
|
49 |
+
gr.Examples(examples, fn=fn, inputs=[input], outputs=[output0, output1, output2, output3, output4], cache_examples=True, batch=True)
|
50 |
+
btn.click(fn, inputs=[input], outputs=[output0, output1, output2, output3, output4])
|
51 |
if __name__ == "__main__":
|
52 |
demo.queue().launch()
|