CindyDelage commited on
Commit
982854b
·
verified ·
1 Parent(s): 6f8bc6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -74,12 +74,12 @@ with gr.Blocks(theme=gr.themes.Ocean()) as demo:
74
  "Additionally, feel free to search the internet for frugal methods and present them to the manager. "
75
  "Examples include Knowledge Distillation, Transfer Learning, and others. If implementation guidance is given by your custom tools, always give it in your final answer to the manager. "
76
  "Here is my code: "
77
- "from litellm import completion"
78
  "API_KEY = os.environ.get('API_KEY') "
79
- "model = LiteLLMModel(model_id='anthropic/claude-3-5-sonnet-latest',temperature=0.2,api_key=os.environ['API_KEY'])"
80
- "messages = [{"role": "user", "content": "Hey! how's it going?"}],"
81
- "response = completion(model=model, messages=messages)"
82
- "print(response). Please give me frugal alternatives."
83
  ],
84
  description="Share your Python code with this AI agent! It will track its CO2 emissions using CodeCarbon and recommend greener, frugal AI alternatives."
85
  )
 
74
  "Additionally, feel free to search the internet for frugal methods and present them to the manager. "
75
  "Examples include Knowledge Distillation, Transfer Learning, and others. If implementation guidance is given by your custom tools, always give it in your final answer to the manager. "
76
  "Here is my code: "
77
+ "import anthropic"
78
  "API_KEY = os.environ.get('API_KEY') "
79
+ "client = anthropic.Anthropic(API_KEY)"
80
+ "message = client.messages.create(model='claude-sonnet-4-20250514',max_tokens=1024,messages=[{"role": "user", "content": "Hello, Claude"}])"
81
+ "print(message.content)"
82
+ "Please give me frugal alternatives."
83
  ],
84
  description="Share your Python code with this AI agent! It will track its CO2 emissions using CodeCarbon and recommend greener, frugal AI alternatives."
85
  )