Akshayram1 commited on
Commit
8b61647
·
verified ·
1 Parent(s): 9fb1a13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  from smolagents.agents import ToolCallingAgent
3
- from smolagents import tool, GeminiModel # Assuming GeminiModel is the correct class
4
  from typing import Optional
5
  import cv2
6
  import pytesseract
@@ -8,8 +8,8 @@ from PIL import Image
8
  import io
9
  import numpy as np
10
 
11
- # Define the GeminiModel
12
- model = GeminiModel(api_key="AIzaSyCuK0Z50g5AGZrpvG54c8v_8rsOSRPjJJs", model_id="gemini-1.5-flash")
13
 
14
  @tool
15
  def extract_components(image_data: bytes) -> str:
 
1
  import streamlit as st
2
  from smolagents.agents import ToolCallingAgent
3
+ from smolagents import tool, LiteLLMModel
4
  from typing import Optional
5
  import cv2
6
  import pytesseract
 
8
  import io
9
  import numpy as np
10
 
11
+ # Define the LiteLLMModel with OpenAI key
12
+ model = LiteLLMModel(model_id="gpt-4o", api_key="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")
13
 
14
  @tool
15
  def extract_components(image_data: bytes) -> str: