Update app.py
Browse files3 unmodified lines456789101112 unmodified lines242526272829303 unmodified linesdef topn_tokens(sequence, domain_bounds, n):example_dict = {}chars = list(sequence)start_index = domain_bounds['start'][0] - 1end_index = domain_bounds['end'][0] - 1for i in range(len(sequence)):if start_index <= i <= end_index:12 unmodified linesrow_count=(1, "fixed"),col_count=(2, "fixed"),),gr.Dropdown([int(i) for i in range(1, 21)]), # Dropdown with numbers from 1 to 20],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).",3 unmodified lines45678910111212 unmodified lines252627282930313 unmodified linesdef topn_tokens(sequence, domain_bounds, n):example_dict = {}chars = list(sequence)# Convert to integer after extracting from domain_boundsstart_index = int(domain_bounds['start'][0]) - 1end_index = int(domain_bounds['end'][0]) - 1for i in range(len(sequence)):if start_index <= i <= end_index:12 unmodified linesrow_count=(1, "fixed"),col_count=(2, "fixed"),),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