Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,11 +7,13 @@ TITLE = "Talk To Me Morty"
|
|
| 7 |
|
| 8 |
DESCRIPTION = """
|
| 9 |
<p style='text-align:center'>
|
| 10 |
-
The bot was trained on a Rick & Morty dialogues dataset with DialoGPT
|
|
|
|
|
|
|
| 11 |
<img src="https://huggingface.co/spaces/kingabzpro/Rick_and_Morty_Bot/resolve/main/img/rick.png"
|
| 12 |
alt="Rick"
|
| 13 |
-
width="
|
| 14 |
-
</
|
| 15 |
"""
|
| 16 |
|
| 17 |
ARTICLE = """
|
|
@@ -21,10 +23,6 @@ ARTICLE = """
|
|
| 21 |
<a href="https://dagshub.com/kingabzpro/DailoGPT-RickBot"
|
| 22 |
target="_blank">Project on DAGsHub</a>
|
| 23 |
</p>
|
| 24 |
-
<p style='text-align:center'>
|
| 25 |
-
<img src="https://visitor-badge.glitch.me/badge?page_id=kingabzpro/Rick_and_Morty_Bot"
|
| 26 |
-
alt="visitor badge">
|
| 27 |
-
</p>
|
| 28 |
"""
|
| 29 |
|
| 30 |
# βββ Load model once at start ββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -68,9 +66,9 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
|
|
| 68 |
chatbot = gr.Chatbot(height=450)
|
| 69 |
state = gr.State([])
|
| 70 |
|
| 71 |
-
with gr.Row():
|
| 72 |
-
prompt = gr.Textbox(placeholder="Ask Rick anythingβ¦", scale=
|
| 73 |
-
send = gr.Button("Send", variant="primary")
|
| 74 |
|
| 75 |
# send on click or β΅
|
| 76 |
send.click(chat, inputs=[prompt, state], outputs=[chatbot, state])
|
|
|
|
| 7 |
|
| 8 |
DESCRIPTION = """
|
| 9 |
<p style='text-align:center'>
|
| 10 |
+
The bot was trained on a Rick & Morty dialogues dataset with DialoGPT.
|
| 11 |
+
</p>
|
| 12 |
+
<center>
|
| 13 |
<img src="https://huggingface.co/spaces/kingabzpro/Rick_and_Morty_Bot/resolve/main/img/rick.png"
|
| 14 |
alt="Rick"
|
| 15 |
+
width="150">
|
| 16 |
+
</center>
|
| 17 |
"""
|
| 18 |
|
| 19 |
ARTICLE = """
|
|
|
|
| 23 |
<a href="https://dagshub.com/kingabzpro/DailoGPT-RickBot"
|
| 24 |
target="_blank">Project on DAGsHub</a>
|
| 25 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"""
|
| 27 |
|
| 28 |
# βββ Load model once at start ββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 66 |
chatbot = gr.Chatbot(height=450)
|
| 67 |
state = gr.State([])
|
| 68 |
|
| 69 |
+
with gr.Row(equal_height=True):
|
| 70 |
+
prompt = gr.Textbox(placeholder="Ask Rick anythingβ¦", scale=9, show_label=False)
|
| 71 |
+
send = gr.Button("Send",scale=1, variant="primary")
|
| 72 |
|
| 73 |
# send on click or β΅
|
| 74 |
send.click(chat, inputs=[prompt, state], outputs=[chatbot, state])
|