sih-hackathon / app.py
samyak152002's picture
Create app.py
2e0abc7 verified
raw
history blame
No virus
447 Bytes
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()