yinuozhang commited on
Commit
a7360b6
1 Parent(s): 82fb410
Files changed (1) hide show
  1. app.py +31 -9
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
- iinputs=[
709
- gr.Textbox(label="Enter SMILES string", placeholder="Enter SMILES notation of peptide...", lines=2),
710
- gr.File(label="Or upload a text file with SMILES", file_types=[".txt"], type="binary"),
711
- gr.Checkbox(label="Show linear representation"),
712
- gr.Checkbox(label="Show segment details") # New checkbox for segment details
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  ],
714
  outputs=[
715
- gr.Textbox(label="Analysis Results", lines=10),
716
- gr.Image(label="2D Structure with Annotations"),
717
- gr.Image(label="Linear Representation")
 
 
 
 
 
 
 
 
 
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="""