Spaces:
Sleeping
Sleeping
Commit
·
1223322
1
Parent(s):
43bcb71
init
Browse files
app.py
CHANGED
@@ -35,17 +35,16 @@ def inference(inputtext, model):
|
|
35 |
else:
|
36 |
return "Model not available."
|
37 |
|
38 |
-
with gr.Blocks() as demo:
|
39 |
gr.Markdown(f"# {title}")
|
40 |
gr.Markdown(description)
|
41 |
|
42 |
context = gr.Textbox(label="Context", lines=10)
|
43 |
-
model = gr.Dropdown(choices=["SteelBERT", "bert-base-uncased"],
|
44 |
output = gr.Textbox(label="Output")
|
45 |
|
46 |
examples_component = gr.Examples(examples=examples, inputs=[context, model])
|
47 |
|
48 |
-
btn = gr.Button("Run")
|
49 |
-
btn.click(fn=inference, inputs=[context, model], outputs=output)
|
50 |
|
51 |
-
demo.launch(
|
|
|
35 |
else:
|
36 |
return "Model not available."
|
37 |
|
38 |
+
with gr.Blocks(title=title, description=description) as demo:
|
39 |
gr.Markdown(f"# {title}")
|
40 |
gr.Markdown(description)
|
41 |
|
42 |
context = gr.Textbox(label="Context", lines=10)
|
43 |
+
model = gr.Dropdown(choices=["SteelBERT", "bert-base-uncased"], label="Model")
|
44 |
output = gr.Textbox(label="Output")
|
45 |
|
46 |
examples_component = gr.Examples(examples=examples, inputs=[context, model])
|
47 |
|
48 |
+
btn = gr.Button("Run", fn=inference, inputs=[context, model], outputs=output)
|
|
|
49 |
|
50 |
+
demo.launch()
|