Fareskh12 commited on
Commit
7e0ea2f
·
verified ·
1 Parent(s): 07da2ea

Create model

Browse files
Files changed (1) hide show
  1. model +30 -0
model ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import skops.io as sio
3
+
4
+ pipe = sio.load("./Model/drug_pipeline.skops", trusted=True)
5
+
6
+
7
+ def predict_drug():
8
+ predicted_drug = pipe.score()
9
+
10
+
11
+ return predicted_drug
12
+
13
+
14
+ outputs = [gr.Label(num_top_classes=5)]
15
+
16
+
17
+
18
+ title = "Drug Classification"
19
+ description = "Enter the details to correctly identify Drug type?"
20
+ 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."
21
+
22
+
23
+ gr.Interface(
24
+ fn=predict_drug,
25
+ outputs=outputs,
26
+ title=title,
27
+ description=description,
28
+ article=article,
29
+ theme=gr.themes.Soft(),
30
+ ).launch()