Paper2Agent commited on
Commit
ab0b126
·
verified ·
1 Parent(s): 8b54db1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -41,7 +41,7 @@ class GradioAgentUI:
41
 
42
  # Default model
43
  if model is None:
44
- api_key = os.environ.get("OPENROUTER_API_KEY")
45
  if not api_key:
46
  raise ValueError(
47
  "OPENROUTER_API_KEY environment variable is not set. "
@@ -53,11 +53,12 @@ class GradioAgentUI:
53
  # temperature=0.7,
54
  # api_key=api_key,
55
  # )
56
-
 
57
  model = ChatAnthropic(
58
  model='claude-sonnet-4-5-20250929',
59
  temperature=0.7,
60
- api_key='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'
61
  )
62
 
63
 
@@ -623,8 +624,8 @@ for the variant chr11:116837649:T>G, associated with Hypoalphalipoproteinemia.""
623
 
624
  app.queue(max_size=10).launch(
625
  share=share,
626
- show_api=False, # 隐藏 "Use via API" 链接
627
- favicon_path=None, # 移除默认favicon
628
  **kwargs
629
  )
630
 
 
41
 
42
  # Default model
43
  if model is None:
44
+ api_key = os.environ["OPENROUTER_API_KEY"]
45
  if not api_key:
46
  raise ValueError(
47
  "OPENROUTER_API_KEY environment variable is not set. "
 
53
  # temperature=0.7,
54
  # api_key=api_key,
55
  # )
56
+
57
+ api_key_anthropic = os.environ["Anthropic_API_KEY"]
58
  model = ChatAnthropic(
59
  model='claude-sonnet-4-5-20250929',
60
  temperature=0.7,
61
+ api_key=api_key_anthropic
62
  )
63
 
64
 
 
624
 
625
  app.queue(max_size=10).launch(
626
  share=share,
627
+ show_api=False,
628
+ favicon_path=None,
629
  **kwargs
630
  )
631