minko186 commited on
Commit
9b0f802
·
verified ·
1 Parent(s): 0381f7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -5,6 +5,7 @@ from ai_generate import generate
5
  import requests
6
  import http.client
7
  import json
 
8
 
9
  def on_first_button_click():
10
  return gr.update(visible=True)
@@ -82,10 +83,11 @@ def ai_generated_test_copyleak(text):
82
  print(data.decode("utf-8")["results"]["summary"])
83
  return data.decode("utf-8")["results"]["summary"]
84
 
 
 
 
85
  def ai_generated_test_gptzero(text):
86
- from model import GPT2PPL
87
- model = GPT2PPL()
88
- result = model(text)
89
  print(result)
90
  return result
91
 
 
5
  import requests
6
  import http.client
7
  import json
8
+ from gptzero_free import GPT2PPL
9
 
10
  def on_first_button_click():
11
  return gr.update(visible=True)
 
83
  print(data.decode("utf-8")["results"]["summary"])
84
  return data.decode("utf-8")["results"]["summary"]
85
 
86
+
87
+ gptzero_model = GPT2PPL()
88
+
89
  def ai_generated_test_gptzero(text):
90
+ result = gptzero_model(text)
 
 
91
  print(result)
92
  return result
93