Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| # Load the pre-trained model | |
| model = pipeline("text-classification", model="hasanmustafa0503/DisorderDetectionModel") | |
| # Define the inference function | |
| def predict_disorder(text): | |
| result = model(text) | |
| return result | |
| # Create a Gradio interface | |
| interface = gr.Interface(fn=predict_disorder, inputs="text", outputs="json") | |
| # Launch the app | |
| interface.launch() | |