Spaces:
Runtime error
Runtime error
resolving bug with interface
Browse files
app.py
CHANGED
@@ -38,16 +38,21 @@ def topk(word,model):
|
|
38 |
|
39 |
return outs
|
40 |
|
41 |
-
with gr.Blocks() as demo:
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
return outs
|
40 |
|
41 |
+
# with gr.Blocks() as demo:
|
42 |
+
# gr.Markdown(f" # {title}")
|
43 |
+
# # gr.Markdown(f" ## {description1}")
|
44 |
+
# # gr.Markdown(f"{description2}")
|
45 |
+
# # gr.Markdown(f"{description3}")
|
46 |
+
# with gr.Row():
|
47 |
+
# word = gr.Textbox(label="Word")
|
48 |
+
# with gr.Row():
|
49 |
+
# greet_btn = gr.Button("Compute")
|
50 |
+
# with gr.Row():
|
51 |
+
# greet_btn.click(fn=topk, inputs=[word,gr.Dropdown(models)], outputs=gr.outputs.Textbox())
|
52 |
+
demo.launch()
|
53 |
+
|
54 |
+
interface = gr.Interface(fn=topk,
|
55 |
+
inputs=[gr.Textbox(label="Word"), gr.Dropdown(models)],
|
56 |
+
outputs=gr.outputs.Textbox()
|
57 |
+
)
|
58 |
+
interface.launch()
|