talantbekdeveloper commited on
Commit
af8055c
·
verified ·
1 Parent(s): 4745f22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -11
app.py CHANGED
@@ -1,15 +1,22 @@
1
- import streamlit as st
2
  from transformers import pipeline
 
3
 
4
- transcriber = pipeline(task="sentiment-analysis")
5
- text = st.text_input('Label', 'enter some text!')
6
 
7
- if text:
8
- out = transcriber(text)
9
- st.json(out)
10
 
11
- uploaded_file = st.file_uploader("Choose a CSV file", accept_multiple_files=True)
12
- bytes_data = uploaded_file.read()
13
- st.write("filename:", uploaded_file.name)
14
- st.write(bytes_data)
15
- st.image(uploaded_file)
 
 
 
 
 
 
 
 
 
 
 
 
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)