curtpond commited on
Commit
7862c87
1 Parent(s): bf0ed33

Updated app.py.

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,10 +12,10 @@ def predict(text):
12
 
13
  # Define interface
14
  iface = gr.Interface(fn=predict,
15
- inputs=gr.inputs.Textbox(lines=10, label="Input Text"),
16
- outputs=gr.outputs.Label(num_top_classes=3),
17
- title="Text Classification",
18
- description="Classify text as other[0], healthcare[1], or technology[2]",
19
  examples=['The indictments were announced Tuesday by the Justice Department in Cairo.', "In 2019, the men's singles winner was Novak Djokovic who defeated Roger Federer in a tournament taking place in the United Kingdom.", 'In a study published by the American Heart Association on January 18, researchers at the Johns Hopkins School of Medicine found that meal timing did not impact weight.'],
20
  allow_flagging='never'
21
  )
 
12
 
13
  # Define interface
14
  iface = gr.Interface(fn=predict,
15
+ title="Text Classification Demo",
16
+ description="This is a demo of a text classification model using Logistic Regression.",
17
+ inputs=gr.Textbox(lines=10, placeholder='Input text here...', label="Input Text"),
18
+ outputs=gr.Textbox(label="Predicted Label", lines=2, placeholder='Predicted label will appear here...'),
19
  examples=['The indictments were announced Tuesday by the Justice Department in Cairo.', "In 2019, the men's singles winner was Novak Djokovic who defeated Roger Federer in a tournament taking place in the United Kingdom.", 'In a study published by the American Heart Association on January 18, researchers at the Johns Hopkins School of Medicine found that meal timing did not impact weight.'],
20
  allow_flagging='never'
21
  )