File size: 603 Bytes
24cbe72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
from hugchat import hugchat

chatbot = hugchat.ChatBot()

def generate_response(prompt):
    response = chatbot.chat(prompt)
    return response

def hugchat_app(prompt):
    response = generate_response(prompt)
    return response

iface = gr.Interface(fn=hugchat_app, inputs="text", outputs="text", title="πŸ€—πŸ’¬ RD-chat-App",
                     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!",
                     article="Made with ❀️ by RD art")
iface.launch()