Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import google.generativeai as genai
|
| 3 |
import json
|
| 4 |
-
|
|
|
|
| 5 |
with open("core.json", "r") as f:
|
| 6 |
knowledge_data = json.load(f)
|
| 7 |
def random_response(user_input, history):
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import google.generativeai as genai
|
| 3 |
import json
|
| 4 |
+
api_key = os.getenv("GEMINI_API_KEY")
|
| 5 |
+
genai.configure(api_key=api_key)
|
| 6 |
with open("core.json", "r") as f:
|
| 7 |
knowledge_data = json.load(f)
|
| 8 |
def random_response(user_input, history):
|