Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,34 +35,42 @@ DESCRIPTION = """\
|
|
| 35 |
#Löwolf GPT1 Chat
|
| 36 |
"""
|
| 37 |
css = """
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
.contain {
|
| 50 |
-
max-width: 900px;
|
| 51 |
-
margin: auto;
|
| 52 |
-
padding-top: 1.5rem;
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
"""
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
-
iface.launch()
|
| 66 |
|
| 67 |
|
| 68 |
|
|
|
|
| 35 |
#Löwolf GPT1 Chat
|
| 36 |
"""
|
| 37 |
css = """
|
| 38 |
+
body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
|
| 39 |
+
.gradio_app { display: flex; flex-direction: column-reverse; max-width: 800px; margin: auto; }
|
| 40 |
+
.gradio_interface { box-shadow: 0 0 20px rgba(0,0,0,0.1); }
|
| 41 |
+
.gradio_text_input { border-radius: 20px; }
|
| 42 |
+
.gradio_text_output { height: calc(100vh - 150px); border-radius: 20px; overflow-y: auto; }
|
| 43 |
+
button { border-radius: 20px; }
|
| 44 |
+
#input-box { order: 2; }
|
| 45 |
+
#output-box { order: 1; }
|
| 46 |
+
#input { height: 50px; }
|
| 47 |
+
#output { height: calc(100vh - 150px); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
"""
|
| 49 |
|
| 50 |
+
# Update the Blocks structure to reflect the desired layout
|
| 51 |
+
with gr.Blocks(css=css) as demo:
|
| 52 |
+
gr.Markdown(DESCRIPTION)
|
| 53 |
+
gr.Markdown(LICENSE)
|
| 54 |
+
gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
| 55 |
+
with gr.Row().style(equal_height=False):
|
| 56 |
+
output_box = gr.Textbox(interactive=False, lines=25, placeholder="Responses will appear here...", elem_id="output-box")
|
| 57 |
+
input_box = gr.Textbox(lines=1, placeholder="Type a message...", elem_id="input-box")
|
| 58 |
+
generate_button = gr.Button("Submit")
|
| 59 |
+
generate_button.click(
|
| 60 |
+
fn=generate,
|
| 61 |
+
inputs=[input_box],
|
| 62 |
+
outputs=output_box
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
if __name__ == "__main__":
|
| 66 |
+
demo.queue(max_size=20).launch()
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
|