eljanmahammadli commited on
Commit
8dcf476
1 Parent(s): 5799ea2

added depth analysis to the full check

Browse files
__pycache__/utils.cpython-311.pyc ADDED
Binary file (12.9 kB). View file
 
__pycache__/writing_analysis.cpython-311.pyc ADDED
Binary file (7.76 kB). View file
 
app.py CHANGED
@@ -244,10 +244,12 @@ def main(
244
  day_to,
245
  domains_to_skip,
246
  )
 
247
  return (
248
  bc_score,
249
  mc_score,
250
  formatted_tokens,
 
251
  )
252
 
253
 
@@ -259,11 +261,10 @@ def build_date(year, month, day):
259
  print("loading depth analysis")
260
  nltk.download('stopwords')
261
  nltk.download('punkt')
262
- nlp = spacy.load("en_core_web_sm")
263
  command = ['python', '-m', 'spacy', 'download', 'en_core_web_sm']
264
-
265
  # Execute the command
266
  subprocess.run(command)
 
267
 
268
  # for perplexity
269
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -378,10 +379,10 @@ with gr.Blocks() as demo:
378
  only_ai_btn = gr.Button("AI Check")
379
  with gr.Column():
380
  only_plagiarism_btn = gr.Button("Plagiarism Check")
381
- with gr.Column():
382
- submit_btn = gr.Button("Full Check")
383
  with gr.Column():
384
  depth_analysis_btn = gr.Button("Depth Analysis")
 
 
385
  gr.Markdown(
386
  """
387
  ## Output
@@ -445,7 +446,7 @@ with gr.Blocks() as demo:
445
  with gr.Row():
446
  with gr.Column():
447
  writing_analysis_plot = gr.Plot(
448
- label="Radar Plot"
449
  )
450
 
451
  submit_btn.click(
@@ -465,6 +466,7 @@ with gr.Blocks() as demo:
465
  bcLabel,
466
  mcLabel,
467
  sentenceBreakdown,
 
468
  ],
469
  api_name="main",
470
  )
 
244
  day_to,
245
  domains_to_skip,
246
  )
247
+ depth_analysis_plot = depth_analysis(input)
248
  return (
249
  bc_score,
250
  mc_score,
251
  formatted_tokens,
252
+ depth_analysis_plot,
253
  )
254
 
255
 
 
261
  print("loading depth analysis")
262
  nltk.download('stopwords')
263
  nltk.download('punkt')
 
264
  command = ['python', '-m', 'spacy', 'download', 'en_core_web_sm']
 
265
  # Execute the command
266
  subprocess.run(command)
267
+ nlp = spacy.load("en_core_web_sm")
268
 
269
  # for perplexity
270
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
379
  only_ai_btn = gr.Button("AI Check")
380
  with gr.Column():
381
  only_plagiarism_btn = gr.Button("Plagiarism Check")
 
 
382
  with gr.Column():
383
  depth_analysis_btn = gr.Button("Depth Analysis")
384
+ with gr.Column():
385
+ submit_btn = gr.Button("Full Check")
386
  gr.Markdown(
387
  """
388
  ## Output
 
446
  with gr.Row():
447
  with gr.Column():
448
  writing_analysis_plot = gr.Plot(
449
+ label="Writing Analysis Plot"
450
  )
451
 
452
  submit_btn.click(
 
466
  bcLabel,
467
  mcLabel,
468
  sentenceBreakdown,
469
+ writing_analysis_plot,
470
  ],
471
  api_name="main",
472
  )