savakholin commited on
Commit
b289879
1 Parent(s): ced1852

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -31,8 +31,16 @@ def embed_upload_file(upload_dict_dania, tokenizer, model):
31
  # 'uid1': {'aa':[[[0.1298, ....]]], 'aan':[[[0.1298, ....]]]}
32
  # }
33
  output = {}
34
- for uid, seqs in upload_dict_dania.items():
 
 
 
 
 
35
  output[uid] = {}
 
 
 
36
  for seq in seqs:
37
  output[uid][seq] = embed(seq, tokenizer, model)
38
 
 
31
  # 'uid1': {'aa':[[[0.1298, ....]]], 'aan':[[[0.1298, ....]]]}
32
  # }
33
  output = {}
34
+
35
+ # Add a placeholder
36
+ latest_iteration = st.empty()
37
+ bar = st.progress(0)
38
+
39
+ for idx, (uid, seqs) in enumerate(upload_dict_dania.items()):
40
  output[uid] = {}
41
+ # Update the progress bar with each iteration.
42
+ latest_iteration.text(f'Iteration {uid}')
43
+ bar.progress(idx + 1)
44
  for seq in seqs:
45
  output[uid][seq] = embed(seq, tokenizer, model)
46