Spaces:
Paused
Paused
import os | |
import gradio as gr | |
MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"] | |
iface = gr.load(name="Ghana-NLP/Khaya-chat-bot",hf_token=MY_HF_TOKEN_KEY,src ='spaces') | |
with gr.Blocks() as demo: | |
with gr.Row(): | |
output = gr.Text(label="Conversation") | |
with gr.Row(): | |
prompt = gr.Text(label="Enter Prompt In Your Local Language") | |
btn = gr.Button("Chat") | |
btn.click(iface, inputs=[seed], outputs=[output] | |
if __name__ == "__main__": | |
demo.queue(max_size=20).launch() |