asoria HF staff commited on
Commit
4b40490
1 Parent(s): a5c2f0e

Adding final progress

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -263,12 +263,12 @@ def generate_topics(dataset, config, split, column, nested_column):
263
  offset += CHUNK_SIZE
264
 
265
  logging.info("Finished processing all data")
266
- cuda.empty_cache() # Clear cache at the end of each chunk
267
- return (
268
  topics_info,
269
  topic_plot,
270
- gr.Label({f"⚙️ Generating topics {dataset}": 1.0}, visible=True),
271
  )
 
272
 
273
 
274
  with gr.Blocks() as demo:
 
263
  offset += CHUNK_SIZE
264
 
265
  logging.info("Finished processing all data")
266
+ yield (
 
267
  topics_info,
268
  topic_plot,
269
+ gr.Label({f" Generating topics {dataset}": 1.0}, visible=True),
270
  )
271
+ cuda.empty_cache()
272
 
273
 
274
  with gr.Blocks() as demo: