Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
# Load the model from Hugging Face | |
classifier = pipeline("text-classification", model="samyak152002/my-disease-classifier-sih") | |
# Define the prediction function | |
def predict(text): | |
result = classifier(text) | |
return result | |
# Set up the Gradio interface | |
interface = gr.Interface(fn=predict, inputs="text", outputs="json", title="Disease Classifier") | |
# Launch the app | |
interface.launch() |