nlpguy commited on
Commit
27c641a
·
1 Parent(s): 7163d85
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1,4 +1,17 @@
1
- # Use a pipeline as a high-level helper
2
  from transformers import pipeline
 
3
 
4
  pipe = pipeline("text-classification", model="agentlans/snowflake-arctic-xs-grammar-classifier")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  from transformers import pipeline
2
+ import gradio as gr
3
 
4
  pipe = pipeline("text-classification", model="agentlans/snowflake-arctic-xs-grammar-classifier")
5
+
6
+ def process(text):
7
+ predictions = pipeline(text)
8
+ return predictions
9
+
10
+ demo = gr.Interface(
11
+ fn=process,
12
+ inputs=["text"],
13
+ outputs=["text"],
14
+ )
15
+
16
+ demo.launch()
17
+