RaniRahbani commited on
Commit
c738e2b
·
verified ·
1 Parent(s): 657d8fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -17
app.py CHANGED
@@ -53,23 +53,24 @@ def respond(
53
  """
54
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
55
  """
56
- demo = gr.ChatInterface(
57
- respond,
58
- # additional_inputs=[
59
- # gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
60
- # gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
61
- # gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
62
- # gr.Slider(
63
- # minimum=0.1,
64
- # maximum=1.0,
65
- # value=0.95,
66
- # step=0.05,
67
- # label="Top-p (nucleus sampling)",
68
- # ),
69
- # ],
70
- )
71
- # Send a default message when the interface loads
72
- chat.send_message("Welcome! I'm your Dietician Assistant. How can I assist you today?")
 
73
 
74
 
75
  if __name__ == "__main__":
 
53
  """
54
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
55
  """
56
+ with gr.Blocks() as demo:
57
+ chat = gr.ChatInterface(
58
+ respond,
59
+ # additional_inputs=[
60
+ # gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
61
+ # gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
62
+ # gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
63
+ # gr.Slider(
64
+ # minimum=0.1,
65
+ # maximum=1.0,
66
+ # value=0.95,
67
+ # step=0.05,
68
+ # label="Top-p (nucleus sampling)",
69
+ # ),
70
+ # ],
71
+ )
72
+ # Send a default message when the interface loads
73
+ chat.send_message("Hi there! I'm your Dietician Assistant, here to help you with general advice on diet, nutrition, and healthy eating habits. Let's explore your questions.")
74
 
75
 
76
  if __name__ == "__main__":