Update app.py
Browse files
app.py
CHANGED
|
@@ -45,15 +45,16 @@ with gr.Blocks() as demo:
|
|
| 45 |
"### ⚠ Sorry for the inconvenience. The Space is currently running on the CPU, which might affect performance. We appreciate your understanding."
|
| 46 |
)
|
| 47 |
|
| 48 |
-
#
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
| 57 |
|
| 58 |
# Menjalankan antarmuka
|
| 59 |
demo.launch()
|
|
|
|
| 45 |
"### ⚠ Sorry for the inconvenience. The Space is currently running on the CPU, which might affect performance. We appreciate your understanding."
|
| 46 |
)
|
| 47 |
|
| 48 |
+
with gr.Row(): # Menggunakan gr.Row() untuk mengatur tata letak secara manual
|
| 49 |
+
with gr.Column(): # Menampilkan output di atas input
|
| 50 |
+
gr.Textbox(label="AI Response", lines=10) # Output teks dari AI
|
| 51 |
+
|
| 52 |
+
with gr.Row(): # Menggunakan gr.Row() untuk input
|
| 53 |
+
with gr.Column(): # Input teks
|
| 54 |
+
input_box = gr.Textbox(label="Ask me anything!", placeholder="Tanyakan sesuatu...")
|
| 55 |
+
|
| 56 |
+
# Menambahkan tombol kirim untuk memulai interaksi
|
| 57 |
+
input_box.submit(generate_response, inputs=input_box, outputs=gr.Textbox(label="AI Response", lines=10))
|
| 58 |
|
| 59 |
# Menjalankan antarmuka
|
| 60 |
demo.launch()
|