|
import streamlit as st |
|
from transformers import pipeline |
|
|
|
def main(): |
|
st.title("Hello Streamlit App") |
|
st.write("Welcome to the Hello Streamlit app!") |
|
name = st.text_input("Enter your name:") |
|
button = st.button("Submit", type="primary", key="1") |
|
if button: |
|
st.write(f"Hello, {name}! Nice to meet you!") |
|
|
|
|
|
pipe = pipeline("text-classification") |
|
results = pipe(name) |
|
st.write(results) |
|
|
|
|
|
pipe2 = pipeline(model="FacebookAI/roberta-large-mnli") |
|
results2 = pipe2(name) |
|
st.write(results2) |
|
|
|
if __name__ == "__main__": |
|
main() |