Spaces:
Sleeping
Sleeping
mastershlfu commited on
Commit ·
7cc305d
1
Parent(s): 679ad8d
Update layout
Browse files
app.py
CHANGED
|
@@ -2,13 +2,19 @@ import gradio as gr
|
|
| 2 |
import pandas as pd
|
| 3 |
import analyze_embedding
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
default_base_text = """Tôi rất thích nghiên cứu về Trí tuệ nhân tạo.
|
| 6 |
I love studying Artificial Intelligence.
|
| 7 |
Con mèo đang ngủ trên ghế sofa.
|
| 8 |
The cat is taking a nap on the couch.
|
| 9 |
Công thức làm bánh pizza ngon nhất thế giới."""
|
| 10 |
|
| 11 |
-
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 12 |
gr.Markdown("### Interactive Demo: Đại chiến 3 Mô hình (Dữ liệu nền động)")
|
| 13 |
gr.Markdown("Bạn có thể thêm, sửa, xóa dữ liệu nền (Knowledge Base) tùy ý. Mỗi câu nằm trên một dòng.")
|
| 14 |
|
|
@@ -27,7 +33,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 27 |
placeholder="VD: Mèo là loài động vật rất dễ thương...",
|
| 28 |
lines=2
|
| 29 |
)
|
| 30 |
-
|
|
|
|
| 31 |
|
| 32 |
with gr.Row():
|
| 33 |
plot_sbert = gr.Plot(label="Vietnamese SBERT")
|
|
@@ -44,4 +51,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 44 |
)
|
| 45 |
|
| 46 |
|
| 47 |
-
demo.launch()
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
import analyze_embedding
|
| 4 |
|
| 5 |
+
custom_css = """
|
| 6 |
+
.gradio-container {
|
| 7 |
+
max-width: 95% !important;
|
| 8 |
+
}
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
default_base_text = """Tôi rất thích nghiên cứu về Trí tuệ nhân tạo.
|
| 12 |
I love studying Artificial Intelligence.
|
| 13 |
Con mèo đang ngủ trên ghế sofa.
|
| 14 |
The cat is taking a nap on the couch.
|
| 15 |
Công thức làm bánh pizza ngon nhất thế giới."""
|
| 16 |
|
| 17 |
+
with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
|
| 18 |
gr.Markdown("### Interactive Demo: Đại chiến 3 Mô hình (Dữ liệu nền động)")
|
| 19 |
gr.Markdown("Bạn có thể thêm, sửa, xóa dữ liệu nền (Knowledge Base) tùy ý. Mỗi câu nằm trên một dòng.")
|
| 20 |
|
|
|
|
| 33 |
placeholder="VD: Mèo là loài động vật rất dễ thương...",
|
| 34 |
lines=2
|
| 35 |
)
|
| 36 |
+
|
| 37 |
+
analyze_btn = gr.Button("Phân tích cả 3 Models", variant="primary")
|
| 38 |
|
| 39 |
with gr.Row():
|
| 40 |
plot_sbert = gr.Plot(label="Vietnamese SBERT")
|
|
|
|
| 51 |
)
|
| 52 |
|
| 53 |
|
| 54 |
+
demo.launch(share=True)
|