curtpond commited on
Commit
f7170b6
1 Parent(s): 4a02fcc

Updated numbers of prediction labels.

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -36,11 +36,7 @@ def vectorize_text(text):
36
  return text
37
 
38
  # Valid input for the model so number of features match
39
- def create_valid_input(text):
40
- text = vectorize_text(text)
41
- text = text.toarray()
42
- text = text.reshape(1, -1)
43
- return text
44
 
45
  # Prediction function
46
  def predict(text):
@@ -54,7 +50,7 @@ demo = gr.Interface(fn=predict,
54
  title="Text Classification Demo",
55
  description="This is a demo of a text classification model using Logistic Regression.",
56
  inputs=gr.Textbox(lines=10, placeholder='Input text here...', label="Input Text"),
57
- outputs=gr.Textbox(label="Predicted Label: Other: 1, Healthcare: 2, Technology: 3", lines=2, placeholder='Predicted label will appear here...'),
58
  allow_flagging='never'
59
  )
60
 
 
36
  return text
37
 
38
  # Valid input for the model so number of features match
39
+ # Code will go here
 
 
 
 
40
 
41
  # Prediction function
42
  def predict(text):
 
50
  title="Text Classification Demo",
51
  description="This is a demo of a text classification model using Logistic Regression.",
52
  inputs=gr.Textbox(lines=10, placeholder='Input text here...', label="Input Text"),
53
+ outputs=gr.Textbox(label="Predicted Label: Other: 0, Healthcare: 1, Technology: 2", lines=2, placeholder='Predicted label will appear here...'),
54
  allow_flagging='never'
55
  )
56