CYF200127 commited on
Commit
0e46131
·
verified ·
1 Parent(s): ecde62e

Update get_molecular_agent.py

Browse files
Files changed (1) hide show
  1. get_molecular_agent.py +6 -2
get_molecular_agent.py CHANGED
@@ -32,8 +32,7 @@ model1 = RxnScribe(ckpt_path, device=torch.device('cpu'))
32
  device = torch.device('cpu')
33
  model = ChemIEToolkit(device=torch.device('cpu'))
34
 
35
- API_KEY = os.getenv("API_KEY")
36
- AZURE_ENDPOINT = os.getenv("AZURE_ENDPOINT")
37
 
38
 
39
  def get_multi_molecular(image_path: str) -> list:
@@ -352,6 +351,8 @@ def process_reaction_image_with_multiple_products_and_text_correctR(image_path:
352
  Returns:
353
  dict: 整理后的反应数据,包括反应物、产物和反应模板。
354
  """
 
 
355
  client = AzureOpenAI(
356
  api_key=API_KEY,
357
  api_version='2024-06-01',
@@ -601,6 +602,9 @@ def process_reaction_image_with_multiple_products_and_text_correctmultiR(image_p
601
  Returns:
602
  dict: 整理后的反应数据,包括反应物、产物和反应模板。
603
  """
 
 
 
604
  client = AzureOpenAI(
605
  api_key=API_KEY,
606
  api_version='2024-06-01',
 
32
  device = torch.device('cpu')
33
  model = ChemIEToolkit(device=torch.device('cpu'))
34
 
35
+
 
36
 
37
 
38
  def get_multi_molecular(image_path: str) -> list:
 
351
  Returns:
352
  dict: 整理后的反应数据,包括反应物、产物和反应模板。
353
  """
354
+ API_KEY = os.getenv("API_KEY")
355
+ AZURE_ENDPOINT = os.getenv("AZURE_ENDPOINT")
356
  client = AzureOpenAI(
357
  api_key=API_KEY,
358
  api_version='2024-06-01',
 
602
  Returns:
603
  dict: 整理后的反应数据,包括反应物、产物和反应模板。
604
  """
605
+
606
+ API_KEY = os.getenv("API_KEY")
607
+ AZURE_ENDPOINT = os.getenv("AZURE_ENDPOINT")
608
  client = AzureOpenAI(
609
  api_key=API_KEY,
610
  api_version='2024-06-01',