mabuseif commited on
Commit
65b6cde
·
verified ·
1 Parent(s): 567ba93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -227,7 +227,7 @@ def live_clock():
227
  const date = `${parts[4].value}-${parts[2].value}-${parts[0].value}`;
228
  const time = `${parts[6].value}:${parts[8].value}:${parts[10].value}`;
229
  const datetimeElement = document.getElementById('live_datetime');
230
- if (datetimeElement) {
231
  datetimeElement.innerText = `${date} ${time}`;
232
  }
233
  }
@@ -393,10 +393,8 @@ with tabs[0]:
393
  </div>
394
  """, unsafe_allow_html=True)
395
  else:
396
- # Normalise hyphens in user inputs for hash generation
397
- normalised_annotated_text = normalise_hyphens(annotated_text)
398
- normalised_task_name = normalise_hyphens(task_name)
399
- scc_hash = generate_citation_hash(author_name, publication_year, source_url, normalised_annotated_text, normalised_annotated_text, username, normalised_task_name, current_date, current_time)
400
  citation_link_start = format_citation_html(source_url, annotated_text, author_name, publication_year, scc_hash)
401
  # Use the longest segment for the end-of-text citation link
402
  selected_fragment = select_longest_segment(annotated_text)
 
227
  const date = `${parts[4].value}-${parts[2].value}-${parts[0].value}`;
228
  const time = `${parts[6].value}:${parts[8].value}:${parts[10].value}`;
229
  const datetimeElement = document.getElementById('live_datetime');
230
+ if datetimeElement:
231
  datetimeElement.innerText = `${date} ${time}`;
232
  }
233
  }
 
393
  </div>
394
  """, unsafe_allow_html=True)
395
  else:
396
+ # Generate hash using normalized inputs
397
+ scc_hash = generate_citation_hash(author_name, publication_year, source_url, annotated_text, annotated_text, username, task_name, current_date, current_time)
 
 
398
  citation_link_start = format_citation_html(source_url, annotated_text, author_name, publication_year, scc_hash)
399
  # Use the longest segment for the end-of-text citation link
400
  selected_fragment = select_longest_segment(annotated_text)