Alesteba commited on
Commit
e7c29ce
1 Parent(s): a1d0d0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1,3 +1,12 @@
1
  import gradio as gr
2
 
3
- gr.Interface.load("models/Alesteba/deep_model_07").load()
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ from transformers import AutoModelForSequenceClassification
4
+
5
+ model = AutoModelForSequenceClassification.from_pretrained("Alesteba/deep_model_07")
6
+
7
+ def predict(prompt):
8
+ completion = model(prompt)[0]["generated_text"]
9
+ return completion
10
+
11
+ gr.Interface(fn=predict, inputs="text", outputs="text").launch()
12
+