Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def respond(
|
|
44 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
45 |
"""
|
46 |
|
47 |
-
demo = gr.ChatInterface(
|
48 |
respond,
|
49 |
|
50 |
title="**Your word** \ Score \ Prompts left ",
|
@@ -64,8 +64,14 @@ demo = gr.ChatInterface(
|
|
64 |
),
|
65 |
],
|
66 |
theme = "soft",
|
67 |
-
)
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
if __name__ == "__main__":
|
71 |
|
|
|
44 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
45 |
"""
|
46 |
|
47 |
+
"""demo = gr.ChatInterface(
|
48 |
respond,
|
49 |
|
50 |
title="**Your word** \ Score \ Prompts left ",
|
|
|
64 |
),
|
65 |
],
|
66 |
theme = "soft",
|
67 |
+
)"""
|
68 |
+
with gr.Blocks() as demo:
|
69 |
+
title_input = gr.Textbox(label="Enter Title", value="Initial Title")
|
70 |
+
chat_interface = gr.ChatInterface(
|
71 |
+
respond,
|
72 |
+
title=title_input, # Dynamically set the title
|
73 |
+
additional_inputs=[title_input], # Pass the title input to the `respond` function
|
74 |
+
)
|
75 |
|
76 |
if __name__ == "__main__":
|
77 |
|