Spaces:
Sleeping
Sleeping
NCTCMumbai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -130,16 +130,16 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
|
|
130 |
# Formatted description
|
131 |
gr.HTML(value="""<p style="font-family: sans-serif; font-size: 16px;">A free chat bot developed by National Customs Targeting Center using Open source LLMs.(Dedicated to 75th Batch IRS Probationers)</p>""", elem_id="description")
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
|
144 |
with gr.Row():
|
145 |
txt = gr.Textbox(
|
@@ -157,7 +157,7 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
|
|
157 |
try:
|
158 |
# Turn off interactivity while generating if you click
|
159 |
txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
160 |
-
bot, [chatbot, api_kind], [
|
161 |
except Exception as e:
|
162 |
print ('Exception txt btn click ' ,str(e))
|
163 |
# Turn it back on
|
@@ -165,7 +165,7 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
|
|
165 |
try:
|
166 |
# Turn off interactivity while generating if you hit enter
|
167 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
168 |
-
bot, [chatbot, api_kind], [
|
169 |
except Exception as e:
|
170 |
print ('Exception ' ,str(e))
|
171 |
|
|
|
130 |
# Formatted description
|
131 |
gr.HTML(value="""<p style="font-family: sans-serif; font-size: 16px;">A free chat bot developed by National Customs Targeting Center using Open source LLMs.(Dedicated to 75th Batch IRS Probationers)</p>""", elem_id="description")
|
132 |
|
133 |
+
chatbot = gr.Chatbot(
|
134 |
+
[],
|
135 |
+
elem_id="chatbot",
|
136 |
+
avatar_images=('https://aui.atlassian.com/aui/8.8/docs/images/avatar-person.svg',
|
137 |
+
'https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.svg'),
|
138 |
+
bubble_full_width=False,
|
139 |
+
show_copy_button=True,
|
140 |
+
show_share_button=True,
|
141 |
+
)
|
142 |
+
chatbot1 = gr.Chatbot()
|
143 |
|
144 |
with gr.Row():
|
145 |
txt = gr.Textbox(
|
|
|
157 |
try:
|
158 |
# Turn off interactivity while generating if you click
|
159 |
txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
160 |
+
bot, [chatbot, api_kind], [chatbot1, prompt_html])
|
161 |
except Exception as e:
|
162 |
print ('Exception txt btn click ' ,str(e))
|
163 |
# Turn it back on
|
|
|
165 |
try:
|
166 |
# Turn off interactivity while generating if you hit enter
|
167 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
168 |
+
bot, [chatbot, api_kind], [chatbot1, prompt_html])
|
169 |
except Exception as e:
|
170 |
print ('Exception ' ,str(e))
|
171 |
|