Fredaaaaaa commited on
Commit
df7465c
·
verified ·
1 Parent(s): 820628c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -447,4 +447,17 @@ def predict_severity(drug1, drug2):
447
 
448
  # Gradio Interface
449
  interface = gr.Interface(
450
- fn=predict_severity,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
 
448
  # Gradio Interface
449
  interface = gr.Interface(
450
+ fn=predict_severity,
451
+ inputs=[
452
+ gr.Textbox(label="Drug 1 (e.g., Aspirin)", placeholder="Enter first drug name"),
453
+ gr.Textbox(label="Drug 2 (e.g., Warfarin)", placeholder="Enter second drug name")
454
+ ],
455
+ outputs=gr.Textbox(label="Prediction Result"),
456
+ title="Drug Interaction Severity Predictor",
457
+ description="Enter two drug names to predict the severity of their interaction.",
458
+ examples=[["Aspirin", "Warfarin"], ["Ibuprofen", "Naproxen"], ["Hydralazine", "Amphetamine"]]
459
+ )
460
+
461
+ # Launch the interface
462
+ if __name__ == "__main__":
463
+ interface.launch(debug=True)