PhDFlo commited on
Commit
9aeca93
·
1 Parent(s): 57bb64f

Gradio app modifs

Browse files
Files changed (1) hide show
  1. app.py +36 -28
app.py CHANGED
@@ -117,35 +117,43 @@ with gr.Blocks() as demo:
117
  # Chai1 Simulation Interface
118
  This interface allows you to run Chai1 simulations on a given Fasta sequence file.
119
  """)
120
- inp1 = gr.Textbox(placeholder="Fasta Sequence file", label="Input Fasta file")
121
- inp2 = gr.Textbox(placeholder="Config file", label="JSON Config file")
122
- btn = gr.Button("Run")
123
- out = Molecule3D(label="Molecule3D", reps=reps)
124
- btn.click(fn=compute_Chai1, inputs=[inp1 , inp2], outputs=[out])
125
 
126
- gr.Markdown(
127
- """
128
- You can input a Fasta file containing the sequence of the molecule you want to simulate.
129
- The output will be a 3D representation of the molecule based on the Chai1 model.
130
- ## Instructions
131
- 1. Upload a Fasta sequence file containing the molecule sequence.
132
- 2. Click the "Run" button to start the simulation.
133
- 3. The output will be a 3D visualization of the molecule.
134
- ## Example Input
135
- You can use the default Fasta file provided in the inputs directory, or upload your own.
136
- ## Output
137
- The output will be a 3D representation of the molecule, which you can interact with.
138
- ## Note
139
- Make sure to have the necessary dependencies installed and the Chai1 model available in the specified directory.
140
- ## Disclaimer
141
- This interface is for educational and research purposes only. The results may vary based on the input sequence and the Chai1 model's capabilities.
142
- ## Contact
143
- For any issues or questions, please contact the developer or refer to the documentation.
144
- ## Example Fasta File
145
- ```
146
- >sp|P12345|EXAMPLE_HUMAN Example protein
147
- MSEQNNTEMTFQIQRIYTKDISFEAPNAPHVQKLLLQGQGQGQGQGQGQGQGQGQGQ
148
- """)
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
  # Launch both the Gradio web interface and the MCP server
151
  if __name__ == "__main__":
 
117
  # Chai1 Simulation Interface
118
  This interface allows you to run Chai1 simulations on a given Fasta sequence file.
119
  """)
 
 
 
 
 
120
 
121
+ with gr.Tab("Configuration 📦"):
122
+ text_input = gr.Textbox()
123
+ text_output = gr.Textbox()
124
+ text_button = gr.Button("Generate Configuration")
125
+ text_button.click(fn=create_custom_config, inputs=[text_input], outputs=[text_output])
126
+
127
+ gr.Markdown(
128
+ """
129
+ You can input a Fasta file containing the sequence of the molecule you want to simulate.
130
+ The output will be a 3D representation of the molecule based on the Chai1 model.
131
+ ## Instructions
132
+ 1. Upload a Fasta sequence file containing the molecule sequence.
133
+ 2. Click the "Run" button to start the simulation.
134
+ 3. The output will be a 3D visualization of the molecule.
135
+ ## Example Input
136
+ You can use the default Fasta file provided in the inputs directory, or upload your own.
137
+ ## Output
138
+ The output will be a 3D representation of the molecule, which you can interact with.
139
+ ## Note
140
+ Make sure to have the necessary dependencies installed and the Chai1 model available in the specified directory.
141
+ ## Disclaimer
142
+ This interface is for educational and research purposes only. The results may vary based on the input sequence and the Chai1 model's capabilities.
143
+ ## Contact
144
+ For any issues or questions, please contact the developer or refer to the documentation.
145
+ ## Example Fasta File
146
+ ```
147
+ >sp|P12345|EXAMPLE_HUMAN Example protein
148
+ MSEQNNTEMTFQIQRIYTKDISFEAPNAPHVQKLLLQGQGQGQGQGQGQGQGQGQGQ
149
+ """)
150
+
151
+ with gr.Tab("Run folding simulation 🚀"):
152
+ inp1 = gr.Textbox(placeholder="Fasta Sequence file", label="Input Fasta file")
153
+ inp2 = gr.Textbox(placeholder="Config file", label="JSON Config file")
154
+ btn = gr.Button("Run")
155
+ out = Molecule3D(label="Molecule3D", reps=reps)
156
+ btn.click(fn=compute_Chai1, inputs=[inp1 , inp2], outputs=[out])
157
 
158
  # Launch both the Gradio web interface and the MCP server
159
  if __name__ == "__main__":