Spaces:
Sleeping
Sleeping
Change to Bahasa Indonesia and change font type
Browse files
app.py
CHANGED
|
@@ -112,11 +112,24 @@ def chat_interface(json_data, question, history):
|
|
| 112 |
|
| 113 |
# === Gradio UI ===
|
| 114 |
with gr.Blocks(title="TAT-LLM: Semi-Tabular Data QA", theme=gr.themes.Soft()) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
gr.Markdown("""
|
| 116 |
-
#
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
""")
|
| 121 |
|
| 122 |
# State to store JSON data
|
|
@@ -154,11 +167,11 @@ with gr.Blocks(title="TAT-LLM: Semi-Tabular Data QA", theme=gr.themes.Soft()) as
|
|
| 154 |
|
| 155 |
with gr.Column(scale=1):
|
| 156 |
# Chat interface
|
| 157 |
-
gr.Markdown("###
|
| 158 |
chatbot = gr.Chatbot(height=400)
|
| 159 |
msg = gr.Textbox(
|
| 160 |
-
label="
|
| 161 |
-
placeholder="
|
| 162 |
lines=2
|
| 163 |
)
|
| 164 |
|
|
@@ -169,11 +182,11 @@ with gr.Blocks(title="TAT-LLM: Semi-Tabular Data QA", theme=gr.themes.Soft()) as
|
|
| 169 |
# Example questions
|
| 170 |
gr.Examples(
|
| 171 |
examples=[
|
| 172 |
-
"
|
| 173 |
-
"
|
| 174 |
-
"
|
| 175 |
-
"
|
| 176 |
-
"
|
| 177 |
],
|
| 178 |
inputs=msg
|
| 179 |
)
|
|
|
|
| 112 |
|
| 113 |
# === Gradio UI ===
|
| 114 |
with gr.Blocks(title="TAT-LLM: Semi-Tabular Data QA", theme=gr.themes.Soft()) as demo:
|
| 115 |
+
gr.HTML("""
|
| 116 |
+
<style>
|
| 117 |
+
body, .gradio-container {
|
| 118 |
+
font-family: 'Poppins', sans-serif;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
h1, h2, h3, h4, h5 {
|
| 122 |
+
font-family: 'Poppins', sans-serif;
|
| 123 |
+
}
|
| 124 |
+
</style>
|
| 125 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
|
| 126 |
+
""")
|
| 127 |
+
|
| 128 |
gr.Markdown("""
|
| 129 |
+
# terTATa: Dari Tabel dan Teks Menjadi Langkah Bisnis Strategis
|
| 130 |
|
| 131 |
+
Unggah berkas XLSX berisi tabel dan paragraf, lalu ajukan pertanyaan tentang data tersebut.
|
| 132 |
+
Sistem akan mengonversi berkas Anda ke format JSON dan menggunakan model TAT-LLM yang telah disempurnakan untuk menjawab pertanyaan.
|
| 133 |
""")
|
| 134 |
|
| 135 |
# State to store JSON data
|
|
|
|
| 167 |
|
| 168 |
with gr.Column(scale=1):
|
| 169 |
# Chat interface
|
| 170 |
+
gr.Markdown("### Ajukan Pertanyaan Mengenai Data Anda")
|
| 171 |
chatbot = gr.Chatbot(height=400)
|
| 172 |
msg = gr.Textbox(
|
| 173 |
+
label="Prompt",
|
| 174 |
+
placeholder="Ajukan pertanyaan tentang data tabel...",
|
| 175 |
lines=2
|
| 176 |
)
|
| 177 |
|
|
|
|
| 182 |
# Example questions
|
| 183 |
gr.Examples(
|
| 184 |
examples=[
|
| 185 |
+
"Apa saja wawasan yang bisa kita ambil dari data ini?",
|
| 186 |
+
"Bagaimana perubahan dari tahun ke tahun?",
|
| 187 |
+
"Apa saja tren utama yang terlihat dalam data?",
|
| 188 |
+
"Hitung persentase perubahan antar tahun.",
|
| 189 |
+
"Rekomendasi apa yang dapat diberikan berdasarkan data ini?"
|
| 190 |
],
|
| 191 |
inputs=msg
|
| 192 |
)
|