Spaces:
Runtime error
Runtime error
File size: 470 Bytes
a91f00e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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() |