Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -250,12 +250,18 @@ def chat(input0, input1, chat_radio, chat_history):
|
|
250 |
out_chat.append((input0, response))
|
251 |
chat_history = json.dumps(out_chat)
|
252 |
|
253 |
-
|
254 |
-
|
255 |
logger.info(f"out_chat_input0 and input1 {input0} -- {input1}")
|
256 |
logger.info(f"chat history {chat_history}")
|
257 |
return out_chat, input1, chat_history
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
with gr.Blocks(title='Talk to chatGPT') as demo:
|
261 |
gr.HTML("<p> Essa é uma demonstração do model GPT-3 aplicado no context de chatbot. </p>")
|
@@ -294,7 +300,8 @@ with gr.Blocks(title='Talk to chatGPT') as demo:
|
|
294 |
outputs=[chatbot, prompt_input1, chat_history],
|
295 |
)
|
296 |
with gr.Row(elem_id='tab_img', visible=False).style(height=5):
|
297 |
-
tab_img = gr.TabbedInterface(tab_actions, tab_titles)
|
298 |
-
|
|
|
299 |
demo.launch(debug = True)
|
300 |
|
|
|
250 |
out_chat.append((input0, response))
|
251 |
chat_history = json.dumps(out_chat)
|
252 |
|
|
|
|
|
253 |
logger.info(f"out_chat_input0 and input1 {input0} -- {input1}")
|
254 |
logger.info(f"chat history {chat_history}")
|
255 |
return out_chat, input1, chat_history
|
256 |
|
257 |
+
article = """
|
258 |
+
<div class="footer">
|
259 |
+
<p><a href="https://chat.openai.com/chat" target="_blank">chatGPT</a>
|
260 |
+
by <a href="https://openai.com/" style="text-decoration: underline;" target="_blank">OpenAI</a> -
|
261 |
+
Gradio Demo by 🤗 <a href="https://englishphonetics.net/" target="_blank">Eriberto Oliveira</a>
|
262 |
+
</p>
|
263 |
+
</div>
|
264 |
+
"""
|
265 |
|
266 |
with gr.Blocks(title='Talk to chatGPT') as demo:
|
267 |
gr.HTML("<p> Essa é uma demonstração do model GPT-3 aplicado no context de chatbot. </p>")
|
|
|
300 |
outputs=[chatbot, prompt_input1, chat_history],
|
301 |
)
|
302 |
with gr.Row(elem_id='tab_img', visible=False).style(height=5):
|
303 |
+
tab_img = gr.TabbedInterface(tab_actions, tab_titles)
|
304 |
+
|
305 |
+
gr.HTML(article)
|
306 |
demo.launch(debug = True)
|
307 |
|