Omnibus commited on
Commit
47fa8e4
·
1 Parent(s): 76c5a6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -292,7 +292,14 @@ with gr.Blocks() as app:
292
 
293
  dec = crypt.decrypt_trans(ea,im)
294
  print(f'dec === {dec}')
295
- json_dec=json.loads(f"{dec}")
 
 
 
 
 
 
 
296
  #dec = dec.strip('"')
297
  out1 = {
298
  'timestamp':ts,
 
292
 
293
  dec = crypt.decrypt_trans(ea,im)
294
  print(f'dec === {dec}')
295
+ string = dec.strip('{}')
296
+ # split the string into key-value pairs
297
+ pairs = string.split(', ')
298
+ json_dec = {key[1:-2]: str(value) for key, value in (pair.split(': ') for pair in pairs)}
299
+
300
+
301
+
302
+ #json_dec=json.loads(f"{dec}")
303
  #dec = dec.strip('"')
304
  out1 = {
305
  'timestamp':ts,