Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -54,21 +54,53 @@ def converse(message, chat_history):
|
|
54 |
history.append(ai_msg)
|
55 |
return history[-1]["content"]
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
71 |
"""
|
72 |
-
))
|
73 |
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
history.append(ai_msg)
|
55 |
return history[-1]["content"]
|
56 |
|
57 |
+
DESCRIPTION = '''
|
58 |
+
<div style="padding: 5px; text-align: left; display: flex; flex-direction: column; align-items: left;">
|
59 |
+
<img src="https://sdgs.bappenas.go.id/repository/assets/bappenas_logo_square.png" style="width: 40%; max-width: 200px; height: auto; opacity: 0.55; ">
|
60 |
+
<h2 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">AI-Interlinked System/Bappenas GPT</h2>
|
61 |
+
</div>
|
62 |
+
'''
|
63 |
+
|
64 |
+
LICENSE = """
|
65 |
+
<p/>
|
66 |
+
---
|
67 |
+
Dibangun dari Meta Llama 3
|
68 |
+
"""
|
69 |
+
|
70 |
+
PLACEHOLDER = """
|
71 |
+
<div style="padding: 100px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
72 |
+
<img src="https://cdn3.iconfinder.com/data/icons/human-resources-flat-3/48/150-4096.png" style="width: 1000; max-width: 200px; height: auto; opacity: 0.55; ">
|
73 |
+
<h2 style="font-size: 20px; margin-bottom: 2px; opacity: 0.55;">Perencana-GPT</h2>
|
74 |
+
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Silakan mulai tanya...</p>
|
75 |
+
</div>
|
76 |
"""
|
|
|
77 |
|
78 |
+
|
79 |
+
css = """
|
80 |
+
h1 {
|
81 |
+
text-align: center;
|
82 |
+
display: block;
|
83 |
+
}
|
84 |
+
#duplicate-button {
|
85 |
+
margin: auto;
|
86 |
+
color: white;
|
87 |
+
background: #1565c0;
|
88 |
+
border-radius: 100vh;
|
89 |
+
}
|
90 |
+
"""
|
91 |
+
# Gradio block
|
92 |
+
chatbot=gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='Interlinked Sytem ChatInterface')
|
93 |
+
|
94 |
+
with gr.Blocks(fill_height=True, css=css) as demo:
|
95 |
+
|
96 |
+
gr.Markdown(DESCRIPTION)
|
97 |
+
gr.ChatInterface(
|
98 |
+
fn=converse,
|
99 |
+
chatbot=chatbot,
|
100 |
+
fill_height=True,
|
101 |
+
)
|
102 |
+
|
103 |
+
gr.Markdown(LICENSE)
|
104 |
+
|
105 |
+
if __name__ == "__main__":
|
106 |
+
demo.launch()
|