Spaces:
Sleeping
Sleeping
Commit ·
4e75ab2
1
Parent(s): 8d51194
..
Browse files
app.py
CHANGED
|
@@ -6,12 +6,14 @@ from openai import OpenAI
|
|
| 6 |
# import anthropic
|
| 7 |
import gradio as gr # oh yeah!
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
| 10 |
def set_openai_api_key(apikey):
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
-
openai = OpenAI(api_key=openai_api_key)
|
| 15 |
system_message = "You are a helpful assistant"
|
| 16 |
|
| 17 |
def create_gtm(product,location):
|
|
|
|
| 6 |
# import anthropic
|
| 7 |
import gradio as gr # oh yeah!
|
| 8 |
|
| 9 |
+
openai = OpenAI(api_key="")
|
| 10 |
+
|
| 11 |
+
api_key_storage = {"key": None}
|
| 12 |
def set_openai_api_key(apikey):
|
| 13 |
+
api_key_storage["key"] = apikey
|
| 14 |
+
openai.api_key = apikey
|
| 15 |
+
return "✅ API key has been set and stored!"
|
| 16 |
|
|
|
|
| 17 |
system_message = "You are a helpful assistant"
|
| 18 |
|
| 19 |
def create_gtm(product,location):
|