Spaces:
Sleeping
Sleeping
YifengDing
commited on
Commit
•
777a53e
1
Parent(s):
ab9f16b
feature: update output
Browse files
app.py
CHANGED
@@ -15,6 +15,13 @@ MAGICODER_PROMPT = """You are an exceptionally intelligent coding assistant that
|
|
15 |
@@ Response
|
16 |
"""
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
title = "<h1 style='text-align: center; margin-bottom: 1rem'>🎩 Magicoder</h1>"
|
19 |
|
20 |
description = """This is a playground for Magicoder-S-DS-6.7B! Follow us on Github: https://github.com/ise-uiuc/magicoder and Huggingface: https://huggingface.co/ise-uiuc.
|
@@ -55,7 +62,7 @@ def main(
|
|
55 |
generated_text = seq["generated_text"].replace(prompt, "")
|
56 |
return generated_text
|
57 |
|
58 |
-
with gr.Blocks() as demo:
|
59 |
gr.Markdown(title)
|
60 |
gr.Markdown(description)
|
61 |
with gr.Row(equal_height=True):
|
@@ -80,12 +87,11 @@ def main(
|
|
80 |
],
|
81 |
inputs = [interface_input]
|
82 |
)
|
83 |
-
with gr.
|
84 |
-
with gr.
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
)
|
89 |
submit.click(
|
90 |
evaluate_magicoder,
|
91 |
inputs=[interface_input, temperature, max_new_tokens],
|
|
|
15 |
@@ Response
|
16 |
"""
|
17 |
|
18 |
+
css = """
|
19 |
+
#q-output {
|
20 |
+
max-height: 60vh;
|
21 |
+
overflow: auto;
|
22 |
+
}
|
23 |
+
"""
|
24 |
+
|
25 |
title = "<h1 style='text-align: center; margin-bottom: 1rem'>🎩 Magicoder</h1>"
|
26 |
|
27 |
description = """This is a playground for Magicoder-S-DS-6.7B! Follow us on Github: https://github.com/ise-uiuc/magicoder and Huggingface: https://huggingface.co/ise-uiuc.
|
|
|
62 |
generated_text = seq["generated_text"].replace(prompt, "")
|
63 |
return generated_text
|
64 |
|
65 |
+
with gr.Blocks(css=css) as demo:
|
66 |
gr.Markdown(title)
|
67 |
gr.Markdown(description)
|
68 |
with gr.Row(equal_height=True):
|
|
|
87 |
],
|
88 |
inputs = [interface_input]
|
89 |
)
|
90 |
+
with gr.Column(variant="default"):
|
91 |
+
with gr.Tab("Output", elem_id="q-output"):
|
92 |
+
output = gr.Markdown(
|
93 |
+
label="Output"
|
94 |
+
)
|
|
|
95 |
submit.click(
|
96 |
evaluate_magicoder,
|
97 |
inputs=[interface_input, temperature, max_new_tokens],
|