T3lli commited on
Commit
937c8cb
·
verified ·
1 Parent(s): 97b7017

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
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