Cosmetique gradio
Browse files
app.py
CHANGED
|
@@ -71,10 +71,40 @@ def compute_Chai1(
|
|
| 71 |
reps = [{"model": 0,"style": "cartoon","color": "whiteCarbon"}]
|
| 72 |
|
| 73 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
inp = gr.Textbox(placeholder="Fasta Sequence file", label="Input Fasta file")
|
| 75 |
btn = gr.Button("Run")
|
| 76 |
out = Molecule3D(label="Molecule3D", reps=reps)
|
| 77 |
btn.click(fn=compute_Chai1, inputs=[inp], outputs=[out])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
# Launch both the Gradio web interface and the MCP server
|
| 80 |
if __name__ == "__main__":
|
|
|
|
| 71 |
reps = [{"model": 0,"style": "cartoon","color": "whiteCarbon"}]
|
| 72 |
|
| 73 |
with gr.Blocks() as demo:
|
| 74 |
+
|
| 75 |
+
gr.Markdown(
|
| 76 |
+
"""
|
| 77 |
+
# Chai1 Simulation Interface
|
| 78 |
+
This interface allows you to run Chai1 simulations on a given Fasta sequence file.
|
| 79 |
+
""")
|
| 80 |
inp = gr.Textbox(placeholder="Fasta Sequence file", label="Input Fasta file")
|
| 81 |
btn = gr.Button("Run")
|
| 82 |
out = Molecule3D(label="Molecule3D", reps=reps)
|
| 83 |
btn.click(fn=compute_Chai1, inputs=[inp], outputs=[out])
|
| 84 |
+
|
| 85 |
+
gr.Markdown(
|
| 86 |
+
"""
|
| 87 |
+
You can input a Fasta file containing the sequence of the molecule you want to simulate.
|
| 88 |
+
The output will be a 3D representation of the molecule based on the Chai1 model.
|
| 89 |
+
## Instructions
|
| 90 |
+
1. Upload a Fasta sequence file containing the molecule sequence.
|
| 91 |
+
2. Click the "Run" button to start the simulation.
|
| 92 |
+
3. The output will be a 3D visualization of the molecule.
|
| 93 |
+
## Example Input
|
| 94 |
+
You can use the default Fasta file provided in the inputs directory, or upload your own.
|
| 95 |
+
## Output
|
| 96 |
+
The output will be a 3D representation of the molecule, which you can interact with.
|
| 97 |
+
## Note
|
| 98 |
+
Make sure to have the necessary dependencies installed and the Chai1 model available in the specified directory.
|
| 99 |
+
## Disclaimer
|
| 100 |
+
This interface is for educational and research purposes only. The results may vary based on the input sequence and the Chai1 model's capabilities.
|
| 101 |
+
## Contact
|
| 102 |
+
For any issues or questions, please contact the developer or refer to the documentation.
|
| 103 |
+
## Example Fasta File
|
| 104 |
+
```
|
| 105 |
+
>sp|P12345|EXAMPLE_HUMAN Example protein
|
| 106 |
+
MSEQNNTEMTFQIQRIYTKDISFEAPNAPHVQKLLLQGQGQGQGQGQGQGQGQGQGQ
|
| 107 |
+
""")
|
| 108 |
|
| 109 |
# Launch both the Gradio web interface and the MCP server
|
| 110 |
if __name__ == "__main__":
|