wt002 commited on
Commit
f75bfd8
·
verified ·
1 Parent(s): 0372a8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,8 +31,8 @@ class BasicAgent:
31
  self.searx_url = "https://searx.space/search" # Set your SearxNG instance URL
32
  #self.wiki = wikipediaapi.Wikipedia('en') # Requires wikipedia-api package
33
 
34
- genai.configure(api_key=os.getenv('GEMINI_API_KEY'))
35
- self.model = genai.GenerativeModel(model)
36
  #usage
37
  #agent = HuggingFaceAgent("google/gemma-7b") # Same architecture as Gemini
38
  #print(agent.generate("Explain quantum computing"))
@@ -101,7 +101,7 @@ class BasicAgent:
101
  try:
102
  # For Gemini 1.5 or later which supports file uploads
103
  with open(file_path, "rb") as f:
104
- file = genai.upload_file(f)
105
  response = self.model.generate_content(
106
  ["Extract and summarize the key points from this document:", file]
107
  )
 
31
  self.searx_url = "https://searx.space/search" # Set your SearxNG instance URL
32
  #self.wiki = wikipediaapi.Wikipedia('en') # Requires wikipedia-api package
33
 
34
+ #genai.configure(api_key=os.getenv('GEMINI_API_KEY'))
35
+ #self.model = genai.GenerativeModel(model)
36
  #usage
37
  #agent = HuggingFaceAgent("google/gemma-7b") # Same architecture as Gemini
38
  #print(agent.generate("Explain quantum computing"))
 
101
  try:
102
  # For Gemini 1.5 or later which supports file uploads
103
  with open(file_path, "rb") as f:
104
+ # file = genai.upload_file(f)
105
  response = self.model.generate_content(
106
  ["Extract and summarize the key points from this document:", file]
107
  )