Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -421,7 +421,14 @@ with gr.Blocks(theme=seafoam) as demo:
|
|
| 421 |
with gr.Row():
|
| 422 |
with gr.Column():
|
| 423 |
peak_data = gr.File(file_count="single", label="Upload MS/MS spectrum file in .msp format", elem_classes=".file-upload-height")
|
| 424 |
-
gr.Examples(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 425 |
spectrum_output = gr.Plot(label="Mass Spectrum",elem_id="custom_plot")
|
| 426 |
peak_data.change(fn=draw_mass_spectrum, inputs=[peak_data], outputs=[spectrum_output])
|
| 427 |
with gr.Row():
|
|
@@ -461,7 +468,14 @@ with gr.Blocks(theme=seafoam) as demo:
|
|
| 461 |
with gr.Tab("📁 Upload structure file"):
|
| 462 |
with gr.Row():
|
| 463 |
with gr.Column():
|
| 464 |
-
user_dataset= gr.File(file_count="single", label="Upload the candidate structure file in csv format, columns=['SMIELS']",elem_classes="file-upload-height2")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 465 |
with gr.Column():
|
| 466 |
user_button = gr.Button("Cross-Modal Retrieval")
|
| 467 |
user_output = gr.Gallery(height='auto',columns=4,elem_classes="gallery-height",label='Cross-modal retrieval results')
|
|
|
|
| 421 |
with gr.Row():
|
| 422 |
with gr.Column():
|
| 423 |
peak_data = gr.File(file_count="single", label="Upload MS/MS spectrum file in .msp format", elem_classes=".file-upload-height")
|
| 424 |
+
gr.Examples(
|
| 425 |
+
examples=[
|
| 426 |
+
["example_spectrum.msp", "HCD", "[M+H]+", "428.0356", "40"]
|
| 427 |
+
],
|
| 428 |
+
inputs=[peak_data, instru, ionmode, par_ion_mass, collision_e],
|
| 429 |
+
outputs=[spectrum_output],
|
| 430 |
+
label="Upload Example Spectrum"
|
| 431 |
+
)
|
| 432 |
spectrum_output = gr.Plot(label="Mass Spectrum",elem_id="custom_plot")
|
| 433 |
peak_data.change(fn=draw_mass_spectrum, inputs=[peak_data], outputs=[spectrum_output])
|
| 434 |
with gr.Row():
|
|
|
|
| 468 |
with gr.Tab("📁 Upload structure file"):
|
| 469 |
with gr.Row():
|
| 470 |
with gr.Column():
|
| 471 |
+
user_dataset= gr.File(file_count="single", label="Upload the candidate structure file in csv format, columns=['SMIELS']",elem_classes="file-upload-height2")
|
| 472 |
+
gr.Examples(
|
| 473 |
+
examples=[
|
| 474 |
+
["user-defined structure file for spectrum1.csv"]
|
| 475 |
+
],
|
| 476 |
+
inputs=[user_dataset],
|
| 477 |
+
label="Upload Example structural file"
|
| 478 |
+
)
|
| 479 |
with gr.Column():
|
| 480 |
user_button = gr.Button("Cross-Modal Retrieval")
|
| 481 |
user_output = gr.Gallery(height='auto',columns=4,elem_classes="gallery-height",label='Cross-modal retrieval results')
|