Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,6 +81,16 @@ button {
|
|
| 81 |
font-weight: 600;
|
| 82 |
border-radius: 14px !important;
|
| 83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
"""
|
| 85 |
|
| 86 |
# =========================
|
|
@@ -95,30 +105,29 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
|
|
| 95 |
</div>
|
| 96 |
""")
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
with gr.Row():
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
placeholder="Hasil ringkasan akan muncul di sini..."
|
| 112 |
-
)
|
| 113 |
-
|
| 114 |
-
btn.click(
|
| 115 |
-
fn=summarize_text,
|
| 116 |
-
inputs=input_text,
|
| 117 |
-
outputs=output_text
|
| 118 |
-
)
|
| 119 |
-
|
| 120 |
-
gr.Markdown(
|
| 121 |
-
"<center><small>© 2025 — AI Summarization System</small></center>"
|
| 122 |
-
)
|
| 123 |
-
|
| 124 |
-
demo.launch()
|
|
|
|
| 81 |
font-weight: 600;
|
| 82 |
border-radius: 14px !important;
|
| 83 |
}
|
| 84 |
+
|
| 85 |
+
.flex-container {
|
| 86 |
+
display: flex;
|
| 87 |
+
gap: 2rem;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.flex-column {
|
| 91 |
+
flex: 1;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
"""
|
| 95 |
|
| 96 |
# =========================
|
|
|
|
| 105 |
</div>
|
| 106 |
""")
|
| 107 |
|
| 108 |
+
with gr.HTML("""
|
| 109 |
+
<div class="flex-container">
|
| 110 |
+
<div class="flex-column">
|
| 111 |
+
<h3>Input Artikel</h3>
|
| 112 |
+
</div>
|
| 113 |
+
<div class="flex-column">
|
| 114 |
+
<h3>Ringkasan</h3>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
"""):
|
| 118 |
+
pass
|
| 119 |
+
|
| 120 |
+
with gr.Group():
|
| 121 |
with gr.Row():
|
| 122 |
+
input_text = gr.Textbox(
|
| 123 |
+
lines=16,
|
| 124 |
+
placeholder="Masukkan teks artikel panjang di sini..."
|
| 125 |
+
)
|
| 126 |
+
output_text = gr.Textbox(
|
| 127 |
+
lines=16,
|
| 128 |
+
placeholder="Hasil ringkasan muncul di sini..."
|
| 129 |
+
)
|
| 130 |
+
|
| 131 |
+
btn = gr.Button("Generate Summary")
|
| 132 |
+
|
| 133 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|