Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 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
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from google import genai
|
|
|
|
| 3 |
from smolagents import DuckDuckGoSearchTool
|
| 4 |
+
import os
|
| 5 |
|
| 6 |
search_tool = DuckDuckGoSearchTool()
|
| 7 |
+
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
|
| 8 |
client = genai.Client(api_key=GEMINI_API_KEY)
|
| 9 |
|
| 10 |
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
|