Spaces:
Running
Running
Commit
·
a7360b6
1
Parent(s):
82fb410
minor fix
Browse files
app.py
CHANGED
|
@@ -704,17 +704,39 @@ def process_input(smiles_input=None, file_obj=None, show_linear=False, show_segm
|
|
| 704 |
return "No input provided.", None, None
|
| 705 |
|
| 706 |
iface = gr.Interface(
|
| 707 |
-
fn=process_input,
|
| 708 |
-
|
| 709 |
-
gr.Textbox(
|
| 710 |
-
|
| 711 |
-
|
| 712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
],
|
| 714 |
outputs=[
|
| 715 |
-
gr.Textbox(
|
| 716 |
-
|
| 717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 718 |
],
|
| 719 |
title="Peptide Structure Analyzer and Visualizer",
|
| 720 |
description="""
|
|
|
|
| 704 |
return "No input provided.", None, None
|
| 705 |
|
| 706 |
iface = gr.Interface(
|
| 707 |
+
fn=process_input, # Your processing function
|
| 708 |
+
inputs=[
|
| 709 |
+
gr.Textbox(
|
| 710 |
+
label="Enter SMILES string",
|
| 711 |
+
placeholder="Enter SMILES notation of peptide...",
|
| 712 |
+
lines=2
|
| 713 |
+
),
|
| 714 |
+
gr.File(
|
| 715 |
+
label="Or upload a text file with SMILES",
|
| 716 |
+
file_types=[".txt"]
|
| 717 |
+
),
|
| 718 |
+
gr.Checkbox(
|
| 719 |
+
label="Show linear representation",
|
| 720 |
+
value=False
|
| 721 |
+
),
|
| 722 |
+
gr.Checkbox(
|
| 723 |
+
label="Show segment details",
|
| 724 |
+
value=False
|
| 725 |
+
)
|
| 726 |
],
|
| 727 |
outputs=[
|
| 728 |
+
gr.Textbox(
|
| 729 |
+
label="Analysis Results",
|
| 730 |
+
lines=10
|
| 731 |
+
),
|
| 732 |
+
gr.Image(
|
| 733 |
+
label="2D Structure with Annotations",
|
| 734 |
+
type="pil"
|
| 735 |
+
),
|
| 736 |
+
gr.Image(
|
| 737 |
+
label="Linear Representation",
|
| 738 |
+
type="pil"
|
| 739 |
+
)
|
| 740 |
],
|
| 741 |
title="Peptide Structure Analyzer and Visualizer",
|
| 742 |
description="""
|