radames HF staff commited on
Commit
7c2cfc6
β€’
1 Parent(s): 8bd5c9a

Quick hack to disable show_progress

Browse files



@cyzgab

amazing demo, is so fast we don't need the progress bar πŸ˜‰

Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -26,6 +26,11 @@ def autocomplete(text):
26
  partial_message = partial_message + chunk.choices[0].delta.content
27
  yield partial_message
28
 
 
 
 
 
 
29
  # Create the Gradio interface with live updates
30
  iface = gr.Interface(
31
  fn=autocomplete,
@@ -36,8 +41,11 @@ iface = gr.Interface(
36
  title="Catch me if you can 🐰",
37
  description="Powered by Groq & Gemma",
38
  live=True, # Set live to True for real-time feedback
39
- allow_flagging="never" # Disable flagging
 
40
  )
 
 
41
 
42
  # Launch the app
43
  iface.launch()
 
26
  partial_message = partial_message + chunk.choices[0].delta.content
27
  yield partial_message
28
 
29
+ css = """
30
+ .generating {
31
+ display: none
32
+ }
33
+ """
34
  # Create the Gradio interface with live updates
35
  iface = gr.Interface(
36
  fn=autocomplete,
 
41
  title="Catch me if you can 🐰",
42
  description="Powered by Groq & Gemma",
43
  live=True, # Set live to True for real-time feedback
44
+ allow_flagging="never", # Disable flagging
45
+ css=css
46
  )
47
+ iface.dependencies[0]['show_progress'] = "hidden"
48
+ iface.dependencies[2]['show_progress'] = "hidden"
49
 
50
  # Launch the app
51
  iface.launch()