Spaces:
Sleeping
Sleeping
Update app.py
Browse filesupdate gradio block
app.py
CHANGED
|
@@ -125,28 +125,30 @@ dataset = apply_chat_template(
|
|
| 125 |
)
|
| 126 |
|
| 127 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
description = gr.Textbox(label="Mô tả nhà", lines=4)
|
| 129 |
location = gr.Textbox(label="Địa chỉ", lines=2)
|
| 130 |
area = gr.Number(label="Diện tích (m²)")
|
| 131 |
output = gr.Textbox(label="Giá nhà")
|
| 132 |
-
greet_btn = gr.Button("Đoán giá", variant=
|
| 133 |
-
greet_btn.click(
|
| 134 |
-
fn=predict_house_price,
|
| 135 |
-
inputs=[description, location, area],
|
| 136 |
-
outputs=output,
|
| 137 |
-
api_name="greet",
|
| 138 |
-
)
|
| 139 |
|
| 140 |
gr.Examples(
|
| 141 |
examples=[
|
| 142 |
[
|
| 143 |
-
"Nhanh tay sở hữu căn nhà riêng (căn góc) 3 tầng tại Phường 10, Gò Vấp
|
| 144 |
"261/, Đường Quang Trung, Phường 10, Quận Gò Vấp",
|
| 145 |
-
40
|
| 146 |
],
|
| 147 |
],
|
| 148 |
inputs=[description, location, area],
|
| 149 |
-
label="Ví dụ mẫu"
|
| 150 |
)
|
| 151 |
|
|
|
|
| 152 |
demo.launch()
|
|
|
|
| 125 |
)
|
| 126 |
|
| 127 |
with gr.Blocks() as demo:
|
| 128 |
+
|
| 129 |
+
gr.Markdown("""
|
| 130 |
+
## 🏠 Dự đoán giá nhà
|
| 131 |
+
Nhập mô tả, địa chỉ và diện tích căn nhà để mô hình dự đoán giá.
|
| 132 |
+
""")
|
| 133 |
+
|
| 134 |
description = gr.Textbox(label="Mô tả nhà", lines=4)
|
| 135 |
location = gr.Textbox(label="Địa chỉ", lines=2)
|
| 136 |
area = gr.Number(label="Diện tích (m²)")
|
| 137 |
output = gr.Textbox(label="Giá nhà")
|
| 138 |
+
greet_btn = gr.Button("Đoán giá", variant='primary')
|
| 139 |
+
greet_btn.click(fn=predict_house_price, inputs=[description, location, area], outputs=output, api_name="greet")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
gr.Examples(
|
| 142 |
examples=[
|
| 143 |
[
|
| 144 |
+
"Nhanh tay sở hữu căn nhà riêng (căn góc) 3 tầng tại Phường 10, Gò Vấp...",
|
| 145 |
"261/, Đường Quang Trung, Phường 10, Quận Gò Vấp",
|
| 146 |
+
40
|
| 147 |
],
|
| 148 |
],
|
| 149 |
inputs=[description, location, area],
|
| 150 |
+
label="Ví dụ mẫu"
|
| 151 |
)
|
| 152 |
|
| 153 |
+
|
| 154 |
demo.launch()
|