azunre commited on
Commit
e867a66
·
verified ·
1 Parent(s): 0ab6129

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -4,5 +4,13 @@ import gradio as gr
4
  MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"]
5
 
6
  iface = gr.load(name="Ghana-NLP/Khaya-chat-bot",hf_token=MY_HF_TOKEN_KEY,src ='spaces')
 
 
 
 
 
 
 
7
 
8
- iface.launch()
 
 
4
  MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"]
5
 
6
  iface = gr.load(name="Ghana-NLP/Khaya-chat-bot",hf_token=MY_HF_TOKEN_KEY,src ='spaces')
7
+ with gr.Blocks() as demo:
8
+ with gr.Row():
9
+ output = gr.Text(label="Conversation")
10
+ with gr.Row():
11
+ prompt = gr.Text(label="Enter Prompt In Your Local Language")
12
+ btn = gr.Button("Chat")
13
+ btn.click(iface, inputs=[seed], outputs=[output]
14
 
15
+ if __name__ == "__main__":
16
+ demo.queue(max_size=20).launch()