Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
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()
|