nebiyu29 commited on
Commit
b989a77
·
verified ·
1 Parent(s): 0abf6b3

made the the gradio different for input and output

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,12 +27,12 @@ def model_classifier(text):
27
 
28
 
29
  #lets define how the output looks like
30
- output_format=gr.DataFrame(row_count=(3,"dynamic"),col_count=(2,"fixed"),label="label probabilities",headers=["label","probabilities"])
31
 
32
  #lets write something that accepts input as text and returns the most likely out come out of 3
33
  demo=gr.Interface(
34
  fn=model_classifier,
35
- inputs=gr.Textbox(lines=5,label="Enter you text"),
36
  outputs=output_format,
37
  title="Hate Classifier Demo App"
38
  )
 
27
 
28
 
29
  #lets define how the output looks like
30
+ output_format=gr.outputs.DataFrame(row_count=(3,"dynamic"),col_count=(2,"fixed"),label="label probabilities",headers=["label","probabilities"])
31
 
32
  #lets write something that accepts input as text and returns the most likely out come out of 3
33
  demo=gr.Interface(
34
  fn=model_classifier,
35
+ inputs=gr.inputs.Textbox(lines=5,label="Enter you text"),
36
  outputs=output_format,
37
  title="Hate Classifier Demo App"
38
  )