catiR commited on
Commit
28363d1
·
1 Parent(s): ce4ae2c

run clustering

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,7 +40,7 @@ def f1(voices, sent, indices):
40
  def label_indices(sentence):
41
  sentence = scripts.runSQ.snorm(sentence)
42
  sentence = sentence.split(' ')
43
- labelled = [(f'{word} {i+1} ', i+1) for i, word in enumerate(sentence)]
44
  return labelled
45
 
46
 
@@ -61,10 +61,10 @@ with bl:
61
  temp_sentmenu = gr.Dropdown(temp_sentences, label="Sentence")
62
  #voiceselect = gr.CheckboxGroup(voices, label="TTS voice",value='Alfur')
63
 
64
- marked_sentence = gr.HighlightedText(interactive=False,color_map = {i:"#dcfce7" for i in range(333)})
65
 
66
  with gr.Row():
67
- spanselect = gr.Textbox(value='1-3',info='Enter the index of the word(s) to analyse. It can be a single word: 4 or a span of words separated by a dash: 2-3')
68
  voiceselect = gr.Radio(voices, label="TTS voice",value='Alfur')
69
 
70
  #with gr.Column(scale=1):
 
40
  def label_indices(sentence):
41
  sentence = scripts.runSQ.snorm(sentence)
42
  sentence = sentence.split(' ')
43
+ labelled = [(f'{word} {i+1} ', str(i+1)) for i, word in enumerate(sentence)]
44
  return labelled
45
 
46
 
 
61
  temp_sentmenu = gr.Dropdown(temp_sentences, label="Sentence")
62
  #voiceselect = gr.CheckboxGroup(voices, label="TTS voice",value='Alfur')
63
 
64
+ marked_sentence = gr.HighlightedText(interactive=False,label="Word selection key",color_map = {str(i):"#dcfce7" for i in range(333)})
65
 
66
  with gr.Row():
67
+ spanselect = gr.Textbox(value='1-3',label="Select words",info='Enter the index of the word(s) to analyse, according to the key above. It can be a single word: 4 or a span of words separated by a dash: 2-3')
68
  voiceselect = gr.Radio(voices, label="TTS voice",value='Alfur')
69
 
70
  #with gr.Column(scale=1):