Hsqcsu commited on
Commit
84d9cdc
·
verified ·
1 Parent(s): 1904a67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,7 +16,7 @@ from ir_process import unified_preprocess_spectrum
16
  from IR_encoder import IRModel
17
  from SMILES_encoder import SmilesModel
18
 
19
- # ==================== Global Configuration (Pure CPU) ====================
20
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
  TOKENIZER_PATH = r"tokenizer-smiles-roberta-1e_new"
22
  EXAMPLE_DIR = "example_files"
@@ -485,7 +485,7 @@ with gr.Blocks(theme=gr.themes.Default(), css=CSS) as demo:
485
  "**Example usage guide:**\n"
486
  "- `INOSINE, 2',3',5'-TRIBENZOATE`: Recommended for **NIST** library.\n"
487
  "- `3-Glycidoxypropyltrimethoxysilane`: Recommended for **NIST** library.\n"
488
- "- `t-boc norfentanyl`: Recommended for **PS** libraries."
489
  )
490
  def _get_ex(kw):
491
  if os.path.exists(EXAMPLE_DIR):
@@ -494,7 +494,7 @@ with gr.Blocks(theme=gr.themes.Default(), css=CSS) as demo:
494
  return os.path.join(EXAMPLE_DIR, f)
495
  return None
496
 
497
- ex_files = [_get_ex("INOSINE"), _get_ex("Glycidoxypropyltrimethoxysilane"), _get_ex("norfentanyl")]
498
 
499
  gr.Examples(
500
  examples=[[f] for f in ex_files if f],
 
16
  from IR_encoder import IRModel
17
  from SMILES_encoder import SmilesModel
18
 
19
+ # ==================== Global Configuration ====================
20
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
  TOKENIZER_PATH = r"tokenizer-smiles-roberta-1e_new"
22
  EXAMPLE_DIR = "example_files"
 
485
  "**Example usage guide:**\n"
486
  "- `INOSINE, 2',3',5'-TRIBENZOATE`: Recommended for **NIST** library.\n"
487
  "- `3-Glycidoxypropyltrimethoxysilane`: Recommended for **NIST** library.\n"
488
+ "- `p-bromofentanyl`: Recommended for **PS** libraries."
489
  )
490
  def _get_ex(kw):
491
  if os.path.exists(EXAMPLE_DIR):
 
494
  return os.path.join(EXAMPLE_DIR, f)
495
  return None
496
 
497
+ ex_files = [_get_ex("INOSINE"), _get_ex("Glycidoxypropyltrimethoxysilane"), _get_ex("bromofentanyl")]
498
 
499
  gr.Examples(
500
  examples=[[f] for f in ex_files if f],