ldhldh commited on
Commit
a80ff08
1 Parent(s): ea0144a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -157,11 +157,11 @@ def used_gpu():
157
 
158
  def get_data():
159
  output = []
160
- with open('Chain_data.json') as json_file:
161
  json_data = json.load(json_file)
162
  output.append({"gpus":get_gpus(), "total":{"total" : blockchain.get_total_gpu_mem(), "used":get_used_gpus(model_name)}, "chain":json_data+blockchain.chain})
163
 
164
- with open('Chain_data.json', 'w') as outfile:
165
  json.dump(output['chain'], outfile)
166
  return output
167
 
 
157
 
158
  def get_data():
159
  output = []
160
+ with open('./Chain_data.json') as json_file:
161
  json_data = json.load(json_file)
162
  output.append({"gpus":get_gpus(), "total":{"total" : blockchain.get_total_gpu_mem(), "used":get_used_gpus(model_name)}, "chain":json_data+blockchain.chain})
163
 
164
+ with open('./Chain_data.json', 'w') as outfile:
165
  json.dump(output['chain'], outfile)
166
  return output
167