aliasgerovs commited on
Commit
c38b78d
·
1 Parent(s): 3ce5e87

aivshuman part fixed.

Browse files
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -219,8 +219,12 @@ def ai_generated_test(input):
219
  sum_prob = 1 - bc_score["HUMAN"]
220
  for key, value in mc_score.items():
221
  mc_score[key] = value * sum_prob
222
-
223
- return bc_score, mc_score
 
 
 
 
224
 
225
  # COMBINED
226
  def main(
@@ -234,7 +238,7 @@ def main(
234
  day_to,
235
  domains_to_skip,
236
  ):
237
- bc_score, mc_score = ai_generated_test(input)
238
  formatted_tokens = plagiarism_check(
239
  input,
240
  year_from,
@@ -246,12 +250,14 @@ def main(
246
  domains_to_skip,
247
  )
248
  depth_analysis_plot = depth_analysis(input)
 
 
249
  return (
250
- bc_score,
251
- mc_score,
252
- formatted_tokens,
253
- depth_analysis_plot,
254
- )
255
 
256
 
257
  def build_date(year, month, day):
 
219
  sum_prob = 1 - bc_score["HUMAN"]
220
  for key, value in mc_score.items():
221
  mc_score[key] = value * sum_prob
222
+
223
+ if sum_prob < 0.1 :
224
+ mc_score = {}
225
+ return bc_score, mc_score
226
+ else:
227
+ return bc_score, mc_score
228
 
229
  # COMBINED
230
  def main(
 
238
  day_to,
239
  domains_to_skip,
240
  ):
241
+
242
  formatted_tokens = plagiarism_check(
243
  input,
244
  year_from,
 
250
  domains_to_skip,
251
  )
252
  depth_analysis_plot = depth_analysis(input)
253
+ bc_score, mc_score = ai_generated_test(input)
254
+
255
  return (
256
+ bc_score,
257
+ mc_score,
258
+ formatted_tokens,
259
+ depth_analysis_plot,
260
+ )
261
 
262
 
263
  def build_date(year, month, day):