Tingxie commited on
Commit
fcb8759
·
1 Parent(s): ad2262b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -120,7 +120,7 @@ def draw_mass_spectrum(peak_data_path):
120
  ms2 = spectrum_processing(ms2)
121
  Mz = np.array(ms2.mz)
122
  Intens = np.array(ms2.intensities)
123
- plt.figure(figsize=(8.5,5))
124
  for i in range(len(Mz)):
125
  plt.axvline(x=Mz[i], ymin=0, ymax=Intens[i],c='red')
126
  plt.xlabel("m/z")
@@ -398,12 +398,7 @@ def rank_user_lib(candidate_file,spectrum_path,instrument_type,adduct,collision_
398
 
399
  with gr.Blocks(theme=seafoam) as demo:
400
  gr.HTML(custom_css)
401
- gr.Markdown('<div style="font-size:40px; font-weight:bold;">🔍 Cross-Modal MS2 Retrieval Demo </div>')
402
- gr.Markdown('''
403
- <div style=" font-weight:bold;">
404
- <span style="font-size:40px;"> Based on CSU-MS2 model </span>
405
- </div>
406
- ''')
407
 
408
  #gr.Markdown('<div style="font-size:20px;">You can select from a list of collected databases or upload your structural file by Clicking the button. The MS/MS spectrum to be identified can be uploaded in MSP format. You also need to set the necessary experimental parameters for the input spectrum, including accurate precursor mass and collision energy. Finally, by clicking the "Cross-Modal Retrieval" button, you can retrieve candidates from the selected database or your own structural file and access identification results that include compound structures, scores, and rankings.</div>')
409
  with gr.Tab(label="📶 Struture library", elem_id='custom_tab'):
 
120
  ms2 = spectrum_processing(ms2)
121
  Mz = np.array(ms2.mz)
122
  Intens = np.array(ms2.intensities)
123
+ plt.figure(figsize=(8,5))
124
  for i in range(len(Mz)):
125
  plt.axvline(x=Mz[i], ymin=0, ymax=Intens[i],c='red')
126
  plt.xlabel("m/z")
 
398
 
399
  with gr.Blocks(theme=seafoam) as demo:
400
  gr.HTML(custom_css)
401
+ gr.Markdown('<div style="font-size:40px; font-weight:bold;">🔍 CSU-MS2 web server </div>')
 
 
 
 
 
402
 
403
  #gr.Markdown('<div style="font-size:20px;">You can select from a list of collected databases or upload your structural file by Clicking the button. The MS/MS spectrum to be identified can be uploaded in MSP format. You also need to set the necessary experimental parameters for the input spectrum, including accurate precursor mass and collision energy. Finally, by clicking the "Cross-Modal Retrieval" button, you can retrieve candidates from the selected database or your own structural file and access identification results that include compound structures, scores, and rankings.</div>')
404
  with gr.Tab(label="📶 Struture library", elem_id='custom_tab'):