import streamlit as st from transformers import pipeline # Load Zero-Shot Classification Model zero_shot_classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli") # Entry point for the app if __name__ == "__main__": st.write("Hello, Hugging Face Space!") # Title for the app st.title("Zero-Shot Classification") # Input from the user text_input = st.text_area("Enter text to classify:", "") # Define possible candidate labels candidate_labels = ["reasoning", "logic", "problem-solving", "explanation"] # Run the zero-shot model if text_input: result = zero_shot_classifier(text_input, candidate_labels) st.write(result)