Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
from openai import OpenAI
|
|
|
|
| 4 |
|
| 5 |
# ✅ Ensure OpenAI API Key is Set (Use Secrets in Hugging Face)
|
| 6 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
|
@@ -10,9 +11,6 @@ if not OPENAI_API_KEY:
|
|
| 10 |
|
| 11 |
client = OpenAI(api_key=OPENAI_API_KEY)
|
| 12 |
|
| 13 |
-
# ✅ Load the main prompt
|
| 14 |
-
from main import MAIN_PROMPT
|
| 15 |
-
|
| 16 |
def respond(user_message, history):
|
| 17 |
if not user_message:
|
| 18 |
return "", history
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
from openai import OpenAI
|
| 4 |
+
from prompts import MAIN_PROMPT # ✅ Updated Import to match new filename
|
| 5 |
|
| 6 |
# ✅ Ensure OpenAI API Key is Set (Use Secrets in Hugging Face)
|
| 7 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
|
|
|
| 11 |
|
| 12 |
client = OpenAI(api_key=OPENAI_API_KEY)
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
def respond(user_message, history):
|
| 15 |
if not user_message:
|
| 16 |
return "", history
|