aliasgerovs commited on
Commit
164a7aa
1 Parent(s): 80f1bd8
Files changed (2) hide show
  1. app.py +5 -5
  2. plagiarism.py +2 -2
app.py CHANGED
@@ -128,11 +128,11 @@ with gr.Blocks() as demo:
128
  char_count = gr.Textbox(label="Minumum Character Limit Check")
129
  input_text.change(fn=len_validator, inputs=input_text, outputs=char_count)
130
 
131
- # with gr.Row():
132
- # btn = gr.Button("Bias Buster")
133
- # out = gr.Textbox(label="Bias Corrected Full Input", interactive=False)
134
- # corrections_output = gr.Textbox(label="Bias Corrections", interactive=False)
135
- # btn.click(fn=update, inputs=input_text, outputs=[out, corrections_output])
136
 
137
  with gr.Row():
138
  models = gr.Dropdown(
 
128
  char_count = gr.Textbox(label="Minumum Character Limit Check")
129
  input_text.change(fn=len_validator, inputs=input_text, outputs=char_count)
130
 
131
+ with gr.Row():
132
+ btn = gr.Button("Bias Buster")
133
+ out = gr.Textbox(label="Bias Corrected Full Input", interactive=False)
134
+ corrections_output = gr.Textbox(label="Bias Corrections", interactive=False)
135
+ btn.click(fn=update, inputs=input_text, outputs=[out, corrections_output])
136
 
137
  with gr.Row():
138
  models = gr.Dropdown(
plagiarism.py CHANGED
@@ -141,7 +141,7 @@ def matching_score(sentence_content_tuple):
141
 
142
 
143
  def process_with_multiprocessing(input_data):
144
- with Pool(processes=4) as pool:
145
  scores = pool.map(matching_score, input_data)
146
  return scores
147
 
@@ -342,7 +342,7 @@ def html_highlight(
342
  source_block_size,
343
  )
344
 
345
- html_content = "<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n<div style='font-family: {font}; border: 2px solid black; background-color: #333333; padding: 10px; color: #FFFFFF;'>"
346
  prev_idx = None
347
  combined_sentence = ""
348
  for sentence, _, _, idx in sentence_scores:
 
141
 
142
 
143
  def process_with_multiprocessing(input_data):
144
+ with Pool(processes=6) as pool:
145
  scores = pool.map(matching_score, input_data)
146
  return scores
147
 
 
342
  source_block_size,
343
  )
344
 
345
+ html_content = "<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n<div style='font-family: {font}; border: 2px solid black; padding: 10px; color: #FFFFFF;'>"
346
  prev_idx = None
347
  combined_sentence = ""
348
  for sentence, _, _, idx in sentence_scores: