borakol commited on
Commit
d62539b
·
verified ·
1 Parent(s): 1818da7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -1,16 +1,10 @@
1
  import gradio as gr
2
  from google import genai
 
3
  from smolagents import DuckDuckGoSearchTool
4
- import os
5
- from dotenv import load_dotenv
6
-
7
- load_dotenv()
8
-
9
- GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
10
- client = genai.Client(api_key=GEMINI_API_KEY)
11
 
12
  search_tool = DuckDuckGoSearchTool()
13
-
14
 
15
  def search_and_answer(question:str) -> str: ## question string tipinde olmalı ve çıktısı da string olmalı , değişkenin doğru şekilde gönderilmesi ve çıktının istenilen formatta alınması sağlanabilir
16
  result = search_tool(question)
 
1
  import gradio as gr
2
  from google import genai
3
+ from api_read import GEMINI_API_KEY
4
  from smolagents import DuckDuckGoSearchTool
 
 
 
 
 
 
 
5
 
6
  search_tool = DuckDuckGoSearchTool()
7
+ client = genai.Client(api_key=GEMINI_API_KEY)
8
 
9
  def search_and_answer(question:str) -> str: ## question string tipinde olmalı ve çıktısı da string olmalı , değişkenin doğru şekilde gönderilmesi ve çıktının istenilen formatta alınması sağlanabilir
10
  result = search_tool(question)