Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ def create_assistant(client):
|
|
23 |
assistant = client.beta.assistants.create(
|
24 |
name="Python Code Generator",
|
25 |
instructions=(
|
26 |
-
"You are a
|
27 |
-
"generates
|
28 |
"Only execute code when explicitly asked to."
|
29 |
),
|
30 |
model="gpt-4o",
|
@@ -157,18 +157,18 @@ gr.ChatInterface(
|
|
157 |
fn=chat,
|
158 |
chatbot=gr.Chatbot(height=350),
|
159 |
textbox=gr.MultimodalTextbox(placeholder="Ask anything", container=False, scale=7),
|
160 |
-
title="
|
161 |
description="The assistant can generate code, explain, fix, optimize, document, test, and generally help with code. It can also execute code.",
|
162 |
clear_btn="Clear",
|
163 |
retry_btn=None,
|
164 |
undo_btn=None,
|
165 |
examples=[
|
166 |
-
[{"text": "Generate:
|
167 |
-
[{"text": "Explain:
|
168 |
-
[{"text": "Fix:
|
169 |
-
[{"text": "Optimize:
|
170 |
-
[{"text": "Execute
|
171 |
-
[{"text": "Execute: Chart showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'", "files": []}],
|
172 |
],
|
173 |
cache_examples=False,
|
174 |
multimodal=True,
|
|
|
23 |
assistant = client.beta.assistants.create(
|
24 |
name="Python Code Generator",
|
25 |
instructions=(
|
26 |
+
"You are a polyglot programming language expert that "
|
27 |
+
"generates code and explains it. "
|
28 |
"Only execute code when explicitly asked to."
|
29 |
),
|
30 |
model="gpt-4o",
|
|
|
157 |
fn=chat,
|
158 |
chatbot=gr.Chatbot(height=350),
|
159 |
textbox=gr.MultimodalTextbox(placeholder="Ask anything", container=False, scale=7),
|
160 |
+
title="Polyglot Code Generator",
|
161 |
description="The assistant can generate code, explain, fix, optimize, document, test, and generally help with code. It can also execute code.",
|
162 |
clear_btn="Clear",
|
163 |
retry_btn=None,
|
164 |
undo_btn=None,
|
165 |
examples=[
|
166 |
+
[{"text": "Generate: Python code to fine-tune model meta-llama/Meta-Llama-3.1-8B on dataset gretelai/synthetic_text_to_sql using QLoRA, "files": []}],
|
167 |
+
[{"text": "Explain: "^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[\\W]).{8,}$", "files": []}],
|
168 |
+
[{"text": "Fix: string str = null; string upper = str.ToUpper();", "files": []}],
|
169 |
+
[{"text": "Optimize: SELECT * FROM orders WHERE customer_id IN (SELECT customer_id FROM customers WHERE country = 'USA');", "files": []}],
|
170 |
+
[{"text": "Execute in C#: First 25 Fibbonaci numbers", "files": []}],
|
171 |
+
[{"text": "Execute in Python: Chart showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'", "files": []}],
|
172 |
],
|
173 |
cache_examples=False,
|
174 |
multimodal=True,
|