import streamlit as st from transformers import pipeline # Initialize the zero-shot classification pipeline classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli") # Define the candidate labels according to the Enneagram types labels = ["Peacemaker", "Loyalist", "Achiever", "Reformer", "Individualist", "Helper", "Challenger", "Investigator", "Enthusiast"] # Streamlit interface st.title("Resume-based Personality Prediction") resume_text = st.text_area("Enter Resume Text Here", height=300) if st.button("Predict Personality"): # Make prediction result = classifier(resume_text, labels) # Display the results st.write("Predictions:") for label, score in zip(result['labels'], result['scores']): st.write(f"{label}: {score*100:.2f}%")