AdrianM0 commited on
Commit
fa90b40
·
verified ·
1 Parent(s): 3369de4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -11,6 +11,7 @@ from tokenizers import Tokenizer
11
  from huggingface_hub import hf_hub_download
12
  import gc
13
  from rdkit.Chem import CanonSmiles
 
14
 
15
 
16
  # --- Configuration ---
@@ -434,6 +435,7 @@ def load_model_and_tokenizers():
434
 
435
 
436
  # --- Inference Function for Gradio (Simplified) ---
 
437
  def predict_iupac(smiles_string):
438
  """
439
  Performs SMILES to IUPAC translation using the loaded model and greedy decoding.
 
11
  from huggingface_hub import hf_hub_download
12
  import gc
13
  from rdkit.Chem import CanonSmiles
14
+ import spaces
15
 
16
 
17
  # --- Configuration ---
 
435
 
436
 
437
  # --- Inference Function for Gradio (Simplified) ---
438
+ @spaces.GPU
439
  def predict_iupac(smiles_string):
440
  """
441
  Performs SMILES to IUPAC translation using the loaded model and greedy decoding.