freealise commited on
Commit
f40a604
·
1 Parent(s): 4494fd2

link to dict

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -71,7 +71,7 @@ output_style = st.selectbox(
71
  # User input
72
  sentence = st.text_input('Enter a sentence to analyze:')
73
 
74
- st.markdown("<iframe src='' rows='16' cols='32' name='dict' id='dict'></iframe>", unsafe_allow_html=True)
75
 
76
  if sentence:
77
  # Display the input sentence
@@ -105,7 +105,7 @@ if sentence:
105
  for line in ud_output[2:]:
106
  # Each UD line as a table row
107
  cells = line.replace('_', '\\_').replace('|', '&#124;').replace(':', '&colon;').split('\t')
108
- cells[2] = "<a onclick='document.getElementById(`dict`).contentDocument.body.innerHTML=`<script async src=\`https://cse.google.com/cse.js?cx=002406fddcc60435c\`></script><div class=\`gcse-search\`></div>`;' href='#gsc.q="+cells[2]+"&gsc.tab=1&gsc.sort=' target='dict'>" + cells[2] + "</a>"
109
  table_md += "| " + " | ".join(cells) + " |\n"
110
  table_md += "</div>" # Close the RTL div
111
  print(table_md)
 
71
  # User input
72
  sentence = st.text_input('Enter a sentence to analyze:')
73
 
74
+ st.markdown("<iframe src='https://freeali.se/freealise/translate/index.htm' rows='16' cols='32' name='dict' id='dict'></iframe>", unsafe_allow_html=True)
75
 
76
  if sentence:
77
  # Display the input sentence
 
105
  for line in ud_output[2:]:
106
  # Each UD line as a table row
107
  cells = line.replace('_', '\\_').replace('|', '&#124;').replace(':', '&colon;').split('\t')
108
+ cells[2] = "<a href='#gsc.q="+cells[2]+"&gsc.tab=1&gsc.sort=' target='dict'>" + cells[2] + "</a>"
109
  table_md += "| " + " | ".join(cells) + " |\n"
110
  table_md += "</div>" # Close the RTL div
111
  print(table_md)