artificialguybr commited on
Commit
111c64a
·
verified ·
1 Parent(s): 864eaee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -86,6 +86,7 @@ with gr.Blocks() as demo:
86
  <p> <strong>Discover more:</strong> <a href="https://artificialguy.com">artificialguy.com</a></p>
87
  """
88
  gr.Markdown(description)
 
89
  chatbot = gr.ChatInterface(
90
  fn=chat,
91
  title="LLAMA 2 70B Chatbot",
@@ -93,9 +94,9 @@ with gr.Blocks() as demo:
93
  stop_btn="Stop",
94
  retry_btn="🔄 Retry",
95
  undo_btn="↩️ Undo",
96
- clear_btn="🗑️ Clear"
 
97
  )
98
- message, *_ = chatbot.components
99
  system_msg = gr.Textbox(BASE_SYSTEM_MESSAGE, label="System Message", placeholder="System prompt.", lines=5)
100
  max_tokens = gr.Slider(20, 1024, label="Max Tokens", step=20, value=1024, interactive=True)
101
  temperature = gr.Slider(0.0, 1.0, label="Temperature", step=0.1, value=0.2, interactive=True)
 
86
  <p> <strong>Discover more:</strong> <a href="https://artificialguy.com">artificialguy.com</a></p>
87
  """
88
  gr.Markdown(description)
89
+ message = gr.Textbox(label="What do you want to chat about?", placeholder="Ask me anything.", lines=3)
90
  chatbot = gr.ChatInterface(
91
  fn=chat,
92
  title="LLAMA 2 70B Chatbot",
 
94
  stop_btn="Stop",
95
  retry_btn="🔄 Retry",
96
  undo_btn="↩️ Undo",
97
+ clear_btn="🗑️ Clear",
98
+ textbox=message # Passar o componente Textbox como parâmetro
99
  )
 
100
  system_msg = gr.Textbox(BASE_SYSTEM_MESSAGE, label="System Message", placeholder="System prompt.", lines=5)
101
  max_tokens = gr.Slider(20, 1024, label="Max Tokens", step=20, value=1024, interactive=True)
102
  temperature = gr.Slider(0.0, 1.0, label="Temperature", step=0.1, value=0.2, interactive=True)