monaavr commited on
Commit
dba1aaa
·
verified ·
1 Parent(s): 5a5644a

Sync App files

Browse files
Files changed (2) hide show
  1. README.md +5 -5
  2. drug_app.py +4 -4
README.md CHANGED
@@ -1,11 +1,11 @@
1
  ---
2
  title: Drug Classification
3
- emoji: 🐢
4
- colorFrom: green
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.40.0
8
- app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
  ---
 
1
  ---
2
  title: Drug Classification
3
+ emoji: 💊
4
+ colorFrom: yellow
5
+ colorTo: red
6
  sdk: gradio
7
+ sdk_version: 4.16.0
8
+ app_file: App/drug_app.py
9
  pinned: false
10
  license: apache-2.0
11
  ---
drug_app.py CHANGED
@@ -3,9 +3,9 @@ import skops.io as sio
3
 
4
  pipe = sio.load("Model/drug_pipeline.skops", trusted=sio.get_untrusted_types(file = "Model/drug_pipeline.skops"))
5
 
 
6
  def predict_drug(age, sex, blood_pressure, cholesterol, na_to_k_ratio):
7
- """
8
- Predict drugs based on patient features.
9
 
10
  Args:
11
  age (int): Age of patient
@@ -23,6 +23,7 @@ def predict_drug(age, sex, blood_pressure, cholesterol, na_to_k_ratio):
23
  label = f"Predicted Drug: {predicted_drug}"
24
  return label
25
 
 
26
  inputs = [
27
  gr.Slider(15, 74, step=1, label="Age"),
28
  gr.Radio(["M", "F"], label="Sex"),
@@ -53,5 +54,4 @@ gr.Interface(
53
  description=description,
54
  article=article,
55
  theme=gr.themes.Soft(),
56
- ).launch()
57
-
 
3
 
4
  pipe = sio.load("Model/drug_pipeline.skops", trusted=sio.get_untrusted_types(file = "Model/drug_pipeline.skops"))
5
 
6
+
7
  def predict_drug(age, sex, blood_pressure, cholesterol, na_to_k_ratio):
8
+ """Predict drugs based on patient features.
 
9
 
10
  Args:
11
  age (int): Age of patient
 
23
  label = f"Predicted Drug: {predicted_drug}"
24
  return label
25
 
26
+
27
  inputs = [
28
  gr.Slider(15, 74, step=1, label="Age"),
29
  gr.Radio(["M", "F"], label="Sex"),
 
54
  description=description,
55
  article=article,
56
  theme=gr.themes.Soft(),
57
+ ).launch(share=True)