Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import json
|
|
| 5 |
|
| 6 |
# These will be set as Hugging Face Spaces secrets
|
| 7 |
API_KEY = os.environ.get("FIREWORKS_API_KEY", "")
|
| 8 |
-
SYSTEM_PROMPT = os.environ.get("SYSTEM_PROMPT")
|
| 9 |
|
| 10 |
# API endpoint
|
| 11 |
API_URL = "https://api.fireworks.ai/inference/v1/chat/completions"
|
|
@@ -109,7 +109,7 @@ footer {
|
|
| 109 |
|
| 110 |
# Create Gradio interface
|
| 111 |
with gr.Blocks(css=custom_css, theme=gr.themes.Soft(primary_hue="purple", secondary_hue="pink")) as demo:
|
| 112 |
-
gr.HTML("<h1 id='title'
|
| 113 |
gr.HTML("<p id='subtitle'>Intelligent conversations powered by advanced language models</p>")
|
| 114 |
|
| 115 |
with gr.Row():
|
|
@@ -121,8 +121,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(primary_hue="purple", second
|
|
| 121 |
"https://api.dicebear.com/7.x/avataaars/svg?seed=user",
|
| 122 |
"https://api.dicebear.com/7.x/bottts-neutral/svg?seed=ai&backgroundColor=b6e3f4"
|
| 123 |
),
|
| 124 |
-
show_copy_button=True
|
| 125 |
-
likeable=True
|
| 126 |
)
|
| 127 |
|
| 128 |
with gr.Row():
|
|
|
|
| 5 |
|
| 6 |
# These will be set as Hugging Face Spaces secrets
|
| 7 |
API_KEY = os.environ.get("FIREWORKS_API_KEY", "")
|
| 8 |
+
SYSTEM_PROMPT = os.environ.get("SYSTEM_PROMPT", "You are a helpful AI assistant.")
|
| 9 |
|
| 10 |
# API endpoint
|
| 11 |
API_URL = "https://api.fireworks.ai/inference/v1/chat/completions"
|
|
|
|
| 109 |
|
| 110 |
# Create Gradio interface
|
| 111 |
with gr.Blocks(css=custom_css, theme=gr.themes.Soft(primary_hue="purple", secondary_hue="pink")) as demo:
|
| 112 |
+
gr.HTML("<h1 id='title'>✨ AI Playground</h1>")
|
| 113 |
gr.HTML("<p id='subtitle'>Intelligent conversations powered by advanced language models</p>")
|
| 114 |
|
| 115 |
with gr.Row():
|
|
|
|
| 121 |
"https://api.dicebear.com/7.x/avataaars/svg?seed=user",
|
| 122 |
"https://api.dicebear.com/7.x/bottts-neutral/svg?seed=ai&backgroundColor=b6e3f4"
|
| 123 |
),
|
| 124 |
+
show_copy_button=True
|
|
|
|
| 125 |
)
|
| 126 |
|
| 127 |
with gr.Row():
|