Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ class Config:
|
|
26 |
|
27 |
|
28 |
# Assuming 'predict_stability' is your function that predicts protein stability
|
29 |
-
def predict_stability(
|
30 |
# Check if pdb_file is provided
|
31 |
if pdb_file:
|
32 |
pdb_path = pdb_file.name # Get the path of the uploaded PDB file
|
@@ -152,7 +152,7 @@ with gr.Blocks() as demo:
|
|
152 |
|
153 |
predict_button.click(
|
154 |
fn=predict_stability,
|
155 |
-
inputs=[
|
156 |
outputs=prediction_output,
|
157 |
)
|
158 |
|
@@ -170,7 +170,7 @@ with gr.Blocks() as demo:
|
|
170 |
|
171 |
predict_button.click(
|
172 |
fn=predict_stability,
|
173 |
-
inputs=[
|
174 |
outputs=prediction_output,
|
175 |
)
|
176 |
|
|
|
26 |
|
27 |
|
28 |
# Assuming 'predict_stability' is your function that predicts protein stability
|
29 |
+
def predict_stability(model_choice, organism_choice, pdb_file=None, sequence=None, cfg=Config()):
|
30 |
# Check if pdb_file is provided
|
31 |
if pdb_file:
|
32 |
pdb_path = pdb_file.name # Get the path of the uploaded PDB file
|
|
|
152 |
|
153 |
predict_button.click(
|
154 |
fn=predict_stability,
|
155 |
+
inputs=[model_choice, organism_choice, pdb_file],
|
156 |
outputs=prediction_output,
|
157 |
)
|
158 |
|
|
|
170 |
|
171 |
predict_button.click(
|
172 |
fn=predict_stability,
|
173 |
+
inputs=[model_choice, organism_choice, sequence],
|
174 |
outputs=prediction_output,
|
175 |
)
|
176 |
|