Lord-Raven commited on
Commit
bdd14b5
·
1 Parent(s): 055d1a6

Restoring old version.

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -17,5 +17,14 @@ classifier = pipeline(
17
  function_to_apply="sigmoid", # optional as is the default for the task
18
  )
19
 
20
- demo = gr.Interface.from_pipeline(classifier)
 
 
 
 
 
 
 
 
 
21
  demo.launch()
 
17
  function_to_apply="sigmoid", # optional as is the default for the task
18
  )
19
 
20
+ def predict(text):
21
+ return classifier(text)
22
+
23
+ demo = gr.Interface(
24
+ fn = predict,
25
+ inputs = 'text',
26
+ outputs = 'text',
27
+ )
28
+
29
+ # demo = gr.Interface.from_pipeline(classifier)
30
  demo.launch()