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

Old gradio version

Browse files
Files changed (2) hide show
  1. app.py +12 -8
  2. requirements.txt +1 -0
app.py CHANGED
@@ -38,15 +38,19 @@ examples = [["Example text 1", "HanmunRoBERTa", True],
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)
 
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
 
 
requirements.txt CHANGED
@@ -0,0 +1 @@
 
 
1
+ gradio==3.50