Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,19 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
#from datasets import load_dataset, Image
|
3 |
from huggingface_hub import from_pretrained_keras
|
4 |
|
5 |
-
|
6 |
-
st.
|
|
|
|
|
|
|
|
|
7 |
|
8 |
#loaded_model = keras.saving.load_model("jableable/road_model")
|
9 |
|
10 |
-
model = from_pretrained_keras("keras-io/ocr-for-captcha")
|
11 |
-
model.summary()
|
12 |
#prediction = model.predict(image)
|
13 |
#prediction = tf.squeeze(tf.round(prediction))
|
14 |
#print(f'The image is a {classes[(np.argmax(prediction))]}!')
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
#from datasets import load_dataset, Image
|
4 |
from huggingface_hub import from_pretrained_keras
|
5 |
|
6 |
+
pipe = pipeline('sentiment-analysis')
|
7 |
+
text = st.text_area('enter some text!')
|
8 |
+
|
9 |
+
if text:
|
10 |
+
out = pipe(text)
|
11 |
+
st.json(out)
|
12 |
|
13 |
#loaded_model = keras.saving.load_model("jableable/road_model")
|
14 |
|
15 |
+
#model = from_pretrained_keras("keras-io/ocr-for-captcha")
|
16 |
+
#model.summary()
|
17 |
#prediction = model.predict(image)
|
18 |
#prediction = tf.squeeze(tf.round(prediction))
|
19 |
#print(f'The image is a {classes[(np.argmax(prediction))]}!')
|