MeYourHint commited on
Commit
fd9a211
1 Parent(s): 2023904

Update minor

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -128,12 +128,13 @@ if not os.path.exists("/data/stats"):
128
  with open("/data/stats/Prompts.text", 'w') as f:
129
  pass
130
 
131
- # Total_Calls = 7792
132
- # def update_total_calls():
133
- # global Total_Calls
134
- # Total_Calls_offset = 7792 ## init number from visit, 01/07
135
- # with open("/data/stats/Prompts.text", 'r') as f:
136
- # Total_Calls = len(f.readlines()) + Total_Calls_offset
 
137
 
138
  ### Load Stats ###
139
 
@@ -204,7 +205,7 @@ def generate(
204
  print(text)
205
  with open("/data/stats/Prompts.text", 'a') as f:
206
  f.write(text+'\n')
207
- # update_total_calls()
208
  prompt_list = []
209
  length_list = []
210
  est_length = False
 
128
  with open("/data/stats/Prompts.text", 'w') as f:
129
  pass
130
 
131
+ Total_Calls = 4730
132
+ def update_total_calls():
133
+ global Total_Calls
134
+ Total_Calls_offset = 4730 ## init number from visit, 01/07
135
+ with open("/data/stats/Prompts.text", 'r') as f:
136
+ Total_Calls = len(f.readlines()) + Total_Calls_offset
137
+ print("Prompts Num:",Total_Calls)
138
 
139
  ### Load Stats ###
140
 
 
205
  print(text)
206
  with open("/data/stats/Prompts.text", 'a') as f:
207
  f.write(text+'\n')
208
+ update_total_calls()
209
  prompt_list = []
210
  length_list = []
211
  est_length = False