DocSrvNyk commited on
Commit
36f086e
·
1 Parent(s): 5c99103

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,13 +13,15 @@ def predict_corrected_calcium(total_calcium, total_protein, albumin):
13
  predicted_value = model.predict([[total_calcium, atr]])[0]
14
 
15
  # Return the result string
16
- return f"The Actual Calcium value with Correction is {predicted_value:.2f}. The model is a RDF Regression Model with a MSE of 0.06 and R-squared of 0.931."
17
 
18
  # Define the Gradio interface
19
  interface = gr.Interface(fn=predict_corrected_calcium,
20
  inputs=[gr.inputs.Number(label="Total Calcium in mg/dL"),
21
  gr.inputs.Number(label="Total Protein in g/dL"),
22
  gr.inputs.Number(label="Albumin in g/dL")],
23
- outputs=gr.outputs.Textbox())
 
 
24
 
25
  interface.launch()
 
13
  predicted_value = model.predict([[total_calcium, atr]])[0]
14
 
15
  # Return the result string
16
+ return f"{predicted_value:.2f}. The model is a RDF Regression Model with a MSE of 0.06 and R-squared of 0.931."
17
 
18
  # Define the Gradio interface
19
  interface = gr.Interface(fn=predict_corrected_calcium,
20
  inputs=[gr.inputs.Number(label="Total Calcium in mg/dL"),
21
  gr.inputs.Number(label="Total Protein in g/dL"),
22
  gr.inputs.Number(label="Albumin in g/dL")],
23
+ outputs=gr.outputs.Textbox(label="Corrected Calcium in mg/dL")
24
+ title="RandomForestRegressor assisted Calcium Correction (RaCC)")
25
+ )
26
 
27
  interface.launch()