Spaces:
Sleeping
Sleeping
Commit ·
67c2f8b
1
Parent(s): ba4d0fd
Create app.py
Browse files123456789101112131415import streamlit as stfrom transformers import pipelineimport huggingface_hub# Create a sentiment analysis pipelinepipe = pipeline("sentiment-analysis")
# Streamlit UIst.title("Sentiment Analysis with Qadoos")sentence = st.text_area("Enter a sentence:")if st.button("Analyze"): if sentence: result = pipe(sentence) st.write("Sentiment:", result[0]['label'], "with confidence:", result[0]['score']) else: st.warning("Please enter a sentence.")app.pyAdded+15