Update app.py
Browse files3 unmodified lines4567878910111212 unmodified lines25262727282930313 unmodified linesdef topn_tokens(sequence, domain_bounds, n): example_dict = {} chars = list(sequence) start_index = domain_bounds['start'][0] - 1 end_index = domain_bounds['end'][0] - 1 # Convert to integer after extracting from domain_bounds start_index = int(domain_bounds['start'][0]) - 1 end_index = int(domain_bounds['end'][0]) - 1
for i in range(len(sequence)): if start_index <= i <= end_index:12 unmodified lines row_count=(1, "fixed"), col_count=(2, "fixed"), ), gr.Dropdown([int(i) for i in range(1, 21)]), # Dropdown with numbers from 1 to 20 gr.Dropdown([str(i) for i in range(1, 21)]), # Dropdown with numbers from 1 to 20 as strings ], outputs="dataframe", description="Choose a number between 1-20 to predict n tokens for each position. Choose the start and end index of the domain of interest (indexing starts at 1).",app.py+4-3