Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|