Quick hack to disable show_progress (#3)
Browse files- Quick hack to disable show_progress (7c2cfc6f3397f3d955d6bb984201bf7a1989105d)
Co-authored-by: Radamés Ajna <radames@users.noreply.huggingface.co>
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()
|