Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,12 +27,30 @@ def execute_jupyter_agent(sytem_prompt, user_input):
|
|
| 27 |
message_history = messages
|
| 28 |
yield notebook_html
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# Create the interface
|
| 31 |
-
with gr.Blocks() as demo:
|
| 32 |
gr.Markdown("# HTML Generator")
|
| 33 |
|
| 34 |
with gr.Row():
|
| 35 |
-
system_input = gr.Textbox(label="System prompt",
|
| 36 |
user_input = gr.Textbox(label="User prompt", placeholder="What is 2+1? Use Python to solve.", lines=3)
|
| 37 |
|
| 38 |
generate_btn = gr.Button("Let's go!")
|
|
|
|
| 27 |
message_history = messages
|
| 28 |
yield notebook_html
|
| 29 |
|
| 30 |
+
|
| 31 |
+
css = """
|
| 32 |
+
#component-0 {
|
| 33 |
+
height: 100vh;
|
| 34 |
+
overflow-y: auto;
|
| 35 |
+
padding: 20px;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.gradio-container {
|
| 39 |
+
height: 100vh !important;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.contain {
|
| 43 |
+
height: 100vh !important;
|
| 44 |
+
}
|
| 45 |
+
"""
|
| 46 |
+
|
| 47 |
+
|
| 48 |
# Create the interface
|
| 49 |
+
with gr.Blocks(css=css) as demo:
|
| 50 |
gr.Markdown("# HTML Generator")
|
| 51 |
|
| 52 |
with gr.Row():
|
| 53 |
+
system_input = gr.Textbox(label="System prompt", default="Environment: ipython\n\nYou are a helpful coding assistant. Always first explain what you are going to do before writing code.")
|
| 54 |
user_input = gr.Textbox(label="User prompt", placeholder="What is 2+1? Use Python to solve.", lines=3)
|
| 55 |
|
| 56 |
generate_btn = gr.Button("Let's go!")
|