Alesteba commited on
Commit
2eee280
1 Parent(s): 9e772a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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
- 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
 
 
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