jaifar530 commited on
Commit
71b7c7a
·
unverified ·
1 Parent(s): dbc9c60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -334,6 +334,18 @@ if press_me_button:
334
 
335
  else:
336
  # Repeat the text with a space at the end of each iteration
 
 
 
 
 
 
 
 
 
 
 
 
337
  repeated_text = ""
338
  max_word_count = 500
339
  amplify = 1
@@ -342,7 +354,7 @@ if press_me_button:
342
  else:
343
  amplify = math.ceil(max_word_count / word_count)
344
 
345
- for _ in range(amplify-2):
346
  repeated_text += new_text + " "
347
 
348
  new_text = repeated_text
 
334
 
335
  else:
336
  # Repeat the text with a space at the end of each iteration
337
+
338
+ # Load proper pre-trained for full texts
339
+ file_prefix = 'not_trancated_full_paragraph.xlsx'
340
+ with open(f"{file_prefix}_ridge_model.pkl", 'rb') as file:
341
+ ridge_model = pickle.load(file)
342
+
343
+ with open(f"{file_prefix}_extra_trees_model.pkl", 'rb') as file:
344
+ extra_trees_model = pickle.load(file)
345
+
346
+ with open(f"{file_prefix}_vectorizer.pkl", 'rb') as file:
347
+ vectorizer = pickle.load(file)
348
+
349
  repeated_text = ""
350
  max_word_count = 500
351
  amplify = 1
 
354
  else:
355
  amplify = math.ceil(max_word_count / word_count)
356
 
357
+ for _ in range(amplify):
358
  repeated_text += new_text + " "
359
 
360
  new_text = repeated_text