minko186 commited on
Commit
fe12823
1 Parent(s): 337ef1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from utils import cosineSim, googleSearch, getSentences, parallel_scrap, matchingScore
2
  import gradio as gr
3
  from urllib.request import urlopen, Request
4
  from googleapiclient.discovery import build
@@ -98,7 +98,8 @@ def plagiarism_check(
98
  if soup:
99
  page_content = soup.text
100
  for j, sent in enumerate(sentences):
101
- score = matchingScore(sent, page_content)
 
102
  ScoreArray[i][j] = score
103
 
104
  # ScoreArray = asyncio.run(parallel_analyze_2(soups, sentences, ScoreArray))
 
1
+ from utils import cosineSim, googleSearch, getSentences, parallel_scrap, matchingScore, matchingScoreWithTimeout
2
  import gradio as gr
3
  from urllib.request import urlopen, Request
4
  from googleapiclient.discovery import build
 
98
  if soup:
99
  page_content = soup.text
100
  for j, sent in enumerate(sentences):
101
+ # score = matchingScore(sent, page_content)
102
+ score = matchingScoreWithTimeout(sent, page_content)
103
  ScoreArray[i][j] = score
104
 
105
  # ScoreArray = asyncio.run(parallel_analyze_2(soups, sentences, ScoreArray))