File size: 696 Bytes
7e0ea2f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import gradio as gr
import skops.io as sio
pipe = sio.load("./Model/drug_pipeline.skops", trusted=True)
def predict_drug():
predicted_drug = pipe.score()
return predicted_drug
outputs = [gr.Label(num_top_classes=5)]
title = "Drug Classification"
description = "Enter the details to correctly identify Drug type?"
article = "This app is a part of the Beginner's Guide to CI/CD for Machine Learning. It teaches how to automate training, evaluation, and deployment of models to Hugging Face using GitHub Actions."
gr.Interface(
fn=predict_drug,
outputs=outputs,
title=title,
description=description,
article=article,
theme=gr.themes.Soft(),
).launch()
|