SiteOn commited on
Commit
ff9cdca
·
verified ·
1 Parent(s): 9a67d87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -40,13 +40,23 @@ def respond(
40
  yield response
41
 
42
 
 
 
 
 
 
 
 
 
 
 
43
  """
44
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
45
  """
46
  demo = gr.ChatInterface(
47
  respond,
48
  additional_inputs=[
49
- gr.Textbox(value="You are a friendly Chatbot.", label="System message",visible=False),
50
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
51
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
52
  gr.Slider(
@@ -59,6 +69,9 @@ demo = gr.ChatInterface(
59
  ],
60
  )
61
 
 
 
 
62
 
63
  if __name__ == "__main__":
64
- demo.launch()
 
40
  yield response
41
 
42
 
43
+ css = """
44
+ <style>
45
+ .svelte-1rjryqp {
46
+ display: none !important;
47
+ }
48
+ </style>
49
+ """
50
+
51
+ css_component = gr.HTML(css)
52
+
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", visible=False),
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(
 
69
  ],
70
  )
71
 
72
+ with gr.Blocks() as app:
73
+ css_component # Adiciona o CSS para ocultar a classe
74
+ demo
75
 
76
  if __name__ == "__main__":
77
+ app.launch()