Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from transformers import pipeline | |
| # Load pre-trained model pipeline | |
| model_name = "lucieackley/autotrain-fitness_message_classification-40235104670" | |
| pipe = pipeline('text-classification', model=model_name) | |
| st.title("Fitness Message Classifier") | |
| text = st.text_area("Enter text: ") | |
| if text: | |
| # Get model's prediction | |
| out = pipe(text) | |
| # Show prediction | |
| st.write(f"The text was classified as: {out[0]['label']} with a score of {out[0]['score']:.2f}") | |