Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,8 @@ def respond(
|
|
| 39 |
# Gradio app
|
| 40 |
with gr.Blocks() as demo:
|
| 41 |
with gr.Sidebar():
|
| 42 |
-
hf_token = gr.OAuthToken(
|
|
|
|
| 43 |
system_message = gr.Textbox(
|
| 44 |
value="You are a friendly Chatbot.",
|
| 45 |
label="System message"
|
|
@@ -56,9 +57,7 @@ with gr.Blocks() as demo:
|
|
| 56 |
)
|
| 57 |
|
| 58 |
chatbot = gr.Chatbot()
|
| 59 |
-
|
| 60 |
state = gr.State([]) # to hold conversation history
|
| 61 |
-
|
| 62 |
msg = gr.Textbox(label="Your message")
|
| 63 |
|
| 64 |
msg.submit(
|
|
@@ -69,4 +68,4 @@ with gr.Blocks() as demo:
|
|
| 69 |
)
|
| 70 |
|
| 71 |
if __name__ == "__main__":
|
| 72 |
-
demo.launch()
|
|
|
|
| 39 |
# Gradio app
|
| 40 |
with gr.Blocks() as demo:
|
| 41 |
with gr.Sidebar():
|
| 42 |
+
hf_token = gr.OAuthToken() # Correct usage: no label
|
| 43 |
+
gr.Markdown("## Configure Chatbot Settings")
|
| 44 |
system_message = gr.Textbox(
|
| 45 |
value="You are a friendly Chatbot.",
|
| 46 |
label="System message"
|
|
|
|
| 57 |
)
|
| 58 |
|
| 59 |
chatbot = gr.Chatbot()
|
|
|
|
| 60 |
state = gr.State([]) # to hold conversation history
|
|
|
|
| 61 |
msg = gr.Textbox(label="Your message")
|
| 62 |
|
| 63 |
msg.submit(
|
|
|
|
| 68 |
)
|
| 69 |
|
| 70 |
if __name__ == "__main__":
|
| 71 |
+
demo.launch()
|