danielritchie commited on
Commit
cb7e45c
1 Parent(s): a2ada34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -5,6 +5,11 @@ from datasets import load_dataset
5
  from sklearn.model_selection import train_test_split
6
  import subprocess
7
 
 
 
 
 
 
8
  # Function to show value counts of 'Hair Loss'
9
  def show_hair_loss_counts():
10
  return df['Hair Loss'].value_counts().to_json() # Convert to JSON for display
@@ -112,5 +117,12 @@ with gr.Blocks() as demo:
112
  run_button = gr.Button("Run Command")
113
  run_button.click(run_command, inputs=command_input, outputs=command_output)
114
 
 
 
 
 
 
 
 
115
  demo.launch()
116
 
 
5
  from sklearn.model_selection import train_test_split
6
  import subprocess
7
 
8
+ from sklearn.metrics import classification_report
9
+
10
+
11
+
12
+
13
  # Function to show value counts of 'Hair Loss'
14
  def show_hair_loss_counts():
15
  return df['Hair Loss'].value_counts().to_json() # Convert to JSON for display
 
117
  run_button = gr.Button("Run Command")
118
  run_button.click(run_command, inputs=command_input, outputs=command_output)
119
 
120
+
121
+
122
+
123
+ y_pred = model.predict(X_test)
124
+ print(classification_report(y_test, y_pred))
125
+
126
+
127
  demo.launch()
128