Spaces:
Sleeping
Sleeping
import torch | |
import streamlit as st | |
from transformers import pipeline | |
title="Text Generator" | |
classifier = pipeline(task="sentiment-analysis", | |
model="distilbert-base-uncased-finetuned-sst-2-english") | |
def main(): | |
st.title(title) | |
with st.form("questionaire"): | |
prompt1 = st.text_input("your text") | |
clicked = st.form_submit_button("Generate image") | |
if clicked: | |
results=classifier(prompt1) | |
st.text(results) | |
if __name__=='__main__': | |
main() |