Spaces:
Runtime error
Runtime error
import gradio as gr | |
import torch | |
from transformers import pipeline | |
# بارگذاری مدل | |
model = pipeline("text-classification", model="rinrikatoki/dorna-merged-diabetes") | |
def predict(text): | |
result = model(text) | |
return result | |
# ساخت اینترفیس Gradio | |
iface = gr.Interface( | |
fn=predict, | |
inputs="text", | |
outputs="label", | |
title="Diabetes Prediction Model", | |
description="A demo for diabetes classification model." | |
) | |
iface.launch() |