sagawa commited on
Commit
f01f3e2
1 Parent(s): e9bac56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -18,6 +18,7 @@ with gr.Blocks() as demo:
18
  model_choice = gr.Radio(choices=["SaProt", "ESM-2"], label="Select PLTNUM's base model.", value="SaProt")
19
  organism_choice = gr.Radio(choices=["Mouse", "Human"], label="Select the target organism.", value="Mouse")
20
 
 
21
  with gr.Tabs():
22
  with gr.TabItem("Upload PDB File"):
23
  gr.Markdown("### Upload your PDB file:")
@@ -25,7 +26,7 @@ with gr.Blocks() as demo:
25
  predict_button = gr.Button("Predict Stability")
26
  prediction_output = gr.Textbox(label="Stability Prediction", interactive=False)
27
 
28
- predict_button.click(fn=predict_stability, inputs=pdb_file, outputs=prediction_output)
29
 
30
  with gr.TabItem("Enter Protein Sequence"):
31
  gr.Markdown("### Enter the protein sequence:")
@@ -37,17 +38,17 @@ with gr.Blocks() as demo:
37
  predict_button = gr.Button("Predict Stability")
38
  prediction_output = gr.Textbox(label="Stability Prediction", interactive=False)
39
 
40
- predict_button.click(fn=predict_stability, inputs=sequence, outputs=prediction_output)
41
 
42
- with gr.Row():
43
- gr.Markdown(
44
- """
45
- ### How to Use:
46
- - **Upload PDB File**: Choose the 'Upload PDB File' tab and upload your file.
47
- - **Enter Sequence**: Alternatively, switch to the 'Enter Protein Sequence' tab and input your sequence.
48
- - **Predict**: Click 'Predict Stability' to receive the prediction.
49
- """
50
- )
51
 
52
  gr.Markdown(
53
  """
@@ -56,4 +57,4 @@ with gr.Blocks() as demo:
56
  """
57
  )
58
 
59
- demo.launch()
 
18
  model_choice = gr.Radio(choices=["SaProt", "ESM-2"], label="Select PLTNUM's base model.", value="SaProt")
19
  organism_choice = gr.Radio(choices=["Mouse", "Human"], label="Select the target organism.", value="Mouse")
20
 
21
+
22
  with gr.Tabs():
23
  with gr.TabItem("Upload PDB File"):
24
  gr.Markdown("### Upload your PDB file:")
 
26
  predict_button = gr.Button("Predict Stability")
27
  prediction_output = gr.Textbox(label="Stability Prediction", interactive=False)
28
 
29
+ predict_button.click(fn=predict_stability, inputs=[model_choice, pdb_file], outputs=prediction_output)
30
 
31
  with gr.TabItem("Enter Protein Sequence"):
32
  gr.Markdown("### Enter the protein sequence:")
 
38
  predict_button = gr.Button("Predict Stability")
39
  prediction_output = gr.Textbox(label="Stability Prediction", interactive=False)
40
 
41
+ predict_button.click(fn=predict_stability, inputs=[model_choice, sequence], outputs=prediction_output)
42
 
43
+ gr.Markdown(
44
+ """
45
+ ### How to Use:
46
+ - **Select Model**: Choose between 'Model A' or 'Model B' for your prediction.
47
+ - **Upload PDB File**: Choose the 'Upload PDB File' tab and upload your file.
48
+ - **Enter Sequence**: Alternatively, switch to the 'Enter Protein Sequence' tab and input your sequence.
49
+ - **Predict**: Click 'Predict Stability' to receive the prediction.
50
+ """
51
+ )
52
 
53
  gr.Markdown(
54
  """
 
57
  """
58
  )
59
 
60
+ demo.launch()