Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,16 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
|
3 |
from transformers import AutoModelForSequenceClassification
|
4 |
|
5 |
model = AutoModelForSequenceClassification.from_pretrained("Alesteba/deep_model_07")
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
return completion
|
10 |
|
|
|
|
|
|
|
11 |
gr.Interface(fn=predict, inputs="text", outputs="text").launch()
|
12 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import tensorflow as tf
|
3 |
+
import numpy as np
|
4 |
|
5 |
from transformers import AutoModelForSequenceClassification
|
6 |
|
7 |
model = AutoModelForSequenceClassification.from_pretrained("Alesteba/deep_model_07")
|
8 |
|
9 |
+
from huggingface_hub import from_pretrained_keras
|
10 |
+
model = from_pretrained_keras("Alesteba/deep_model_07")
|
|
|
11 |
|
12 |
+
def predict(prompt):
|
13 |
+
return model.predict('prompt')[0]
|
14 |
+
|
15 |
gr.Interface(fn=predict, inputs="text", outputs="text").launch()
|
16 |
|