Spaces:
Runtime error
Runtime error
Abid
commited on
Commit
•
ea55fae
1
Parent(s):
ab6f309
bot on hf space
Browse files- README.md +1 -1
- app.py +22 -0
- img/rick.gif +0 -0
- requirements.txt +1 -0
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
title: Rick_and_Morty_Bot
|
3 |
-
emoji:
|
4 |
colorFrom: blue
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
|
|
1 |
---
|
2 |
title: Rick_and_Morty_Bot
|
3 |
+
emoji: 🥒
|
4 |
colorFrom: blue
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
https://huggingface.co/kingabzpro/DialoGPT-small-Rick-Bot
|
3 |
+
|
4 |
+
|
5 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
6 |
+
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "Rick-bot-flags")
|
7 |
+
|
8 |
+
title = "Have Fun With RickBot"
|
9 |
+
description = """
|
10 |
+
<p>
|
11 |
+
<center>
|
12 |
+
The bot is trained on Rick and Morty dialogues Kaggle Dataset using DialoGPT.
|
13 |
+
<img src="https://gradio.app/assets/img/rick.gif">
|
14 |
+
</center>
|
15 |
+
</p>
|
16 |
+
"""
|
17 |
+
article = "<p style='text-align: center'><a href='https://medium.com/geekculture/discord-bot-using-dailogpt-and-huggingface-api-c71983422701' target='_blank'>Complete Tutorial</a></p><p style='text-align: center'><a href='https://dagshub.com/kingabzpro/DailoGPT-RickBot' target='_blank'>Project is Available at DAGsHub</a></p></center></p>"
|
18 |
+
|
19 |
+
gr.Interface.load("kingabzpro/DialoGPT-small-Rick-Bot",
|
20 |
+
"textbox","chatbot",theme ="grass", title = title, flagging_callback=hf_writer,description = description, article = article).launch(enable_queue=True) # customizes the input component
|
21 |
+
|
22 |
+
|
img/rick.gif
ADDED
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio==2.8.0b10
|