yenniejun commited on
Commit
3b68316
·
1 Parent(s): 019096f

Update gradio

Browse files
Files changed (2) hide show
  1. app.py +8 -12
  2. requirements.txt +0 -1
app.py CHANGED
@@ -38,19 +38,15 @@ examples = [["Example text 1", "HanmunRoBERTa", True],
38
  ["Example text 2", "HanmunRoBERTa", True]]
39
 
40
  # Set up the Gradio interface
41
- gr.Interface(
42
- inference,
43
- [gr.inputs.Textbox(label="Input text", lines=10),
44
- gr.inputs.Dropdown(choices=["HanmunRoBERTa"],
45
- type="value",
46
- default="HanmunRoBERTa",
47
  label="Model"),
48
- gr.inputs.Checkbox(label="Remove punctuation", value=True)],
49
- [gr.outputs.Label(label="Output")],
50
  examples=examples,
51
  title=title,
52
- description=description).launch(enable_queue=True)
53
-
54
-
55
-
56
 
 
 
38
  ["Example text 2", "HanmunRoBERTa", True]]
39
 
40
  # Set up the Gradio interface
41
+ iface = gr.Interface(
42
+ fn=inference,
43
+ inputs=[gr.Textbox(label="Input text", lines=10),
44
+ gr.Dropdown(choices=["HanmunRoBERTa"],
 
 
45
  label="Model"),
46
+ gr.Checkbox(label="Remove punctuation", value=True)],
47
+ outputs=gr.Label(label="Output"),
48
  examples=examples,
49
  title=title,
50
+ description=description)
 
 
 
51
 
52
+ iface.launch(enable_queue=True)
requirements.txt CHANGED
@@ -1 +0,0 @@
1
- gradio==3.50