Spaces:
No application file
No application file
Ricardo Ruiz
commited on
Commit
·
24cbe72
1
Parent(s):
0a4ac64
Chat
Browse files
Chat
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from hugchat import hugchat
|
| 3 |
+
|
| 4 |
+
chatbot = hugchat.ChatBot()
|
| 5 |
+
|
| 6 |
+
def generate_response(prompt):
|
| 7 |
+
response = chatbot.chat(prompt)
|
| 8 |
+
return response
|
| 9 |
+
|
| 10 |
+
def hugchat_app(prompt):
|
| 11 |
+
response = generate_response(prompt)
|
| 12 |
+
return response
|
| 13 |
+
|
| 14 |
+
iface = gr.Interface(fn=hugchat_app, inputs="text", outputs="text", title="🤗💬 RD-chat-App",
|
| 15 |
+
description="This app is an LLM-powered chatbot built using HugChat and OpenAssistant/oasst-sft-6-llama-30b-xor LLM model. 💡 Note: No API key required!",
|
| 16 |
+
article="Made with ❤️ by RD art")
|
| 17 |
+
iface.launch()
|