Update app.py
Browse files
app.py
CHANGED
|
@@ -2,10 +2,11 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
def predict(prompt):
|
| 8 |
-
completion =
|
| 9 |
return completion
|
| 10 |
|
| 11 |
gr.Interface(fn=predict, inputs="text", outputs="text").launch()
|
|
|
|
| 2 |
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
+
classifier = pipeline("news-classifier", model="Alesteba/deep-model-07")
|
| 6 |
+
# model = pipeline("Alesteba/deep-model-07")
|
| 7 |
|
| 8 |
def predict(prompt):
|
| 9 |
+
completion = classifier(prompt)[0]["generated_text"]
|
| 10 |
return completion
|
| 11 |
|
| 12 |
gr.Interface(fn=predict, inputs="text", outputs="text").launch()
|