Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -58,8 +58,7 @@ Today Date: 26 July 2024
|
|
58 |
{system_message}<|eot_id|><|start_header_id|>user<|end_header_id|>
|
59 |
|
60 |
<request>{request}</request>
|
61 |
-
|
62 |
-
"""
|
63 |
|
64 |
@spaces.GPU
|
65 |
def respond(request, file_content, system_message, max_tokens, temperature, top_p):
|
@@ -111,11 +110,13 @@ with gr.Blocks() as demo:
|
|
111 |
with gr.Column():
|
112 |
request_input = gr.Textbox(
|
113 |
label="Request",
|
|
|
114 |
placeholder="Enter your request (e.g., 'fix the function', 'add error handling')",
|
115 |
lines=3
|
116 |
)
|
117 |
file_input = gr.Code(
|
118 |
label="File Content",
|
|
|
119 |
language="python",
|
120 |
lines=10
|
121 |
)
|
@@ -124,7 +125,7 @@ with gr.Blocks() as demo:
|
|
124 |
|
125 |
with gr.Accordion("Advanced Settings", open=False):
|
126 |
system_msg = gr.Textbox(
|
127 |
-
value="
|
128 |
label="System Message"
|
129 |
)
|
130 |
max_tokens = gr.Slider(
|
|
|
58 |
{system_message}<|eot_id|><|start_header_id|>user<|end_header_id|>
|
59 |
|
60 |
<request>{request}</request>
|
61 |
+
<file>{file_content}</file><|eot_id|><|start_header_id|>assistant<|end_header_id|>"""
|
|
|
62 |
|
63 |
@spaces.GPU
|
64 |
def respond(request, file_content, system_message, max_tokens, temperature, top_p):
|
|
|
110 |
with gr.Column():
|
111 |
request_input = gr.Textbox(
|
112 |
label="Request",
|
113 |
+
value="fix the function, to sum all numbers"
|
114 |
placeholder="Enter your request (e.g., 'fix the function', 'add error handling')",
|
115 |
lines=3
|
116 |
)
|
117 |
file_input = gr.Code(
|
118 |
label="File Content",
|
119 |
+
value="def sum_numbers(number_1,number_2,number_3)\n\treturn number_1+number_2",
|
120 |
language="python",
|
121 |
lines=10
|
122 |
)
|
|
|
125 |
|
126 |
with gr.Accordion("Advanced Settings", open=False):
|
127 |
system_msg = gr.Textbox(
|
128 |
+
value="you are a coder asistant, returns the answer to user in diff format",
|
129 |
label="System Message"
|
130 |
)
|
131 |
max_tokens = gr.Slider(
|