File size: 1,515 Bytes
cc4e8d2
0011dce
cc4e8d2
0011dce
 
5cb96fb
9b921b1
0011dce
 
84c9b2d
9b921b1
 
72cd66c
9b921b1
 
 
 
 
 
 
 
 
 
 
 
7ccac1c
9b921b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import streamlit as st
from transformers import pipeline

st.title("Hola mundo")

with st.sidebar:
    st.session_state.model = st.selectbox("Selecciona un modelo", ['pysentimiento/robertuito-sentiment-analysis', 'distilbert/distilbert-base-uncased-finetuned-sst-2-english','bhadresh-savani/distilbert-base-uncased-emotion'])

#no me gusta trabajar los domingos
input = st.text_input("Sundays are good days for relaxing")
Clasificador = pipeline('sentiment-analysis',model=st.session_state.model)
Res=Clasificador(input)
st.write(Res)


st.text("Fixed width text")
st.markdown("_Markdown_")
st.latex(r""" e^{i\pi} + 1 = 0 """)
st.title("My title")
st.header("My header")
st.subheader("My sub")
st.code("for i in range(8): foo()")
st.html("<p>Hi!</p>")


with st.sidebar:
    st.button("Click me")
    st.checkbox("I agree")
    st.feedback("thumbs")
    st.pills("Tags", ["Sports", "Politics"])
    st.radio("Pick one", ["cats", "dogs"])
    st.segmented_control("Filter", ["Open", "Closed"])
    st.toggle("Enable")
    st.selectbox("Pick one", ["cats", "dogs"])
    st.multiselect("Buy", ["milk", "apples", "potatoes"])
    st.slider("Pick a number", 0, 100)
    st.select_slider("Pick a size", ["S", "M", "L"])
    st.text_input("First name")
    st.number_input("Pick a number", 0, 10)
    st.text_area("Text to translate")
    st.date_input("Your birthday")
    st.time_input("Meeting time")
    st.file_uploader("Upload a CSV")
    st.audio_input("Record a voice message")
    st.color_picker("Pick a color")