Georg4000 commited on
Commit
90331f6
·
verified ·
1 Parent(s): 2a9c962

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ # Load model
5
+ classifier = pipeline("text-classification", model="your-username/octagon")
6
+
7
+ def predict(text):
8
+ return classifier(text)
9
+
10
+ iface = gr.Interface(
11
+ fn=predict,
12
+ inputs=gr.Textbox(lines=2, placeholder="Enter text here..."),
13
+ outputs="label",
14
+ title="Octagon Text Classification",
15
+ description="A demo for the Octagon model trained on IMDB reviews."
16
+ )
17
+
18
+ iface.launch()