Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,22 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
from transformers import pipeline
|
|
|
|
| 3 |
|
| 4 |
-
|
| 5 |
-
text = st.text_input('Label', 'enter some text!')
|
| 6 |
|
| 7 |
-
|
| 8 |
-
out = transcriber(text)
|
| 9 |
-
st.json(out)
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
|
| 4 |
+
pipe = pipeline("image-classification", model="google/vit-base-patch16-224")
|
|
|
|
| 5 |
|
| 6 |
+
gr.Interface.from_pipeline(pipe).launch()
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
# import streamlit as st
|
| 9 |
+
# from transformers import pipeline
|
| 10 |
+
|
| 11 |
+
# transcriber = pipeline(task="sentiment-analysis")
|
| 12 |
+
# text = st.text_input('Label', 'enter some text!')
|
| 13 |
+
|
| 14 |
+
# if text:
|
| 15 |
+
# out = transcriber(text)
|
| 16 |
+
# st.json(out)
|
| 17 |
+
|
| 18 |
+
# uploaded_file = st.file_uploader("Choose a CSV file", accept_multiple_files=True)
|
| 19 |
+
# bytes_data = uploaded_file.read()
|
| 20 |
+
# st.write("filename:", uploaded_file.name)
|
| 21 |
+
# st.write(bytes_data)
|
| 22 |
+
# st.image(uploaded_file)
|