CYF200127 commited on
Commit
155c7e5
·
verified ·
1 Parent(s): 4016938

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -20,8 +20,6 @@ ckpt_path = "./pix2seq_reaction_full.ckpt"
20
  model1 = RxnScribe(ckpt_path, device=torch.device('cpu'))
21
  device = torch.device('cpu')
22
 
23
- API_KEY = os.getenv("API_KEY")
24
- AZURE_ENDPOINT = os.getenv("AZURE_ENDPOINT")
25
 
26
  def ChemEagle(image_path: str) -> dict:
27
  """
@@ -34,6 +32,9 @@ def ChemEagle(image_path: str) -> dict:
34
  dict: 整理后的反应数据,包括反应物、产物和反应模板。
35
  """
36
  # 初始化 OpenChemIE 模型和 Azure OpenAI 客户端
 
 
 
37
  client = AzureOpenAI(
38
  api_key=API_KEY,
39
  api_version='2024-06-01',
 
20
  model1 = RxnScribe(ckpt_path, device=torch.device('cpu'))
21
  device = torch.device('cpu')
22
 
 
 
23
 
24
  def ChemEagle(image_path: str) -> dict:
25
  """
 
32
  dict: 整理后的反应数据,包括反应物、产物和反应模板。
33
  """
34
  # 初始化 OpenChemIE 模型和 Azure OpenAI 客户端
35
+ API_KEY = os.getenv("API_KEY")
36
+ AZURE_ENDPOINT = os.getenv("AZURE_ENDPOINT")
37
+
38
  client = AzureOpenAI(
39
  api_key=API_KEY,
40
  api_version='2024-06-01',