ysharma HF staff commited on
Commit
5010e3b
·
verified ·
1 Parent(s): 5dc3275

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -133,7 +133,7 @@ with gr.Blocks(fill_height=True, css=CSS) as demo:
133
  )
134
  with gr.Column():
135
  with gr.Accordion('Open for looking at Ground Truth:', open=False):
136
- refernce = gr.Markdown()
137
  with gr.Row():
138
  b1 = gr.Button("Previous", interactive=False)
139
  b2 = gr.Button("Next")
@@ -151,7 +151,7 @@ with gr.Blocks(fill_height=True, css=CSS) as demo:
151
  print(f'image = {image}')
152
  print(f'prompt = {prompt}')
153
  example = {"text": prompt, "files": [image]}
154
- return example, refernce
155
 
156
  def display_next(dataframe, end):
157
  print(f'initial value of end = {end}')
@@ -171,7 +171,7 @@ with gr.Blocks(fill_height=True, css=CSS) as demo:
171
  print(f'returned value of end = {end}')
172
  return df_images, end, start, gr.Button(interactive=False) if start==0 else gr.Button(interactive=True)
173
 
174
- reka.select(get_example, [reka,num_start], [chat_input, refernce], show_progress="hidden")
175
  b2.click(fn=display_next, inputs= [reka, num_end ], outputs=[reka, num_end, num_start, b1], api_name="next_rows", show_progress=False)
176
  b1.click(fn=display_previous, inputs= [reka, num_start ], outputs=[reka, num_end, num_start, b1], api_name="previous_rows")
177
 
 
133
  )
134
  with gr.Column():
135
  with gr.Accordion('Open for looking at Ground Truth:', open=False):
136
+ refrence = gr.Markdown()
137
  with gr.Row():
138
  b1 = gr.Button("Previous", interactive=False)
139
  b2 = gr.Button("Next")
 
151
  print(f'image = {image}')
152
  print(f'prompt = {prompt}')
153
  example = {"text": prompt, "files": [image]}
154
+ return example, refrence
155
 
156
  def display_next(dataframe, end):
157
  print(f'initial value of end = {end}')
 
171
  print(f'returned value of end = {end}')
172
  return df_images, end, start, gr.Button(interactive=False) if start==0 else gr.Button(interactive=True)
173
 
174
+ reka.select(get_example, [reka,num_start], [chat_input, refrence], show_progress="hidden")
175
  b2.click(fn=display_next, inputs= [reka, num_end ], outputs=[reka, num_end, num_start, b1], api_name="next_rows", show_progress=False)
176
  b1.click(fn=display_previous, inputs= [reka, num_start ], outputs=[reka, num_end, num_start, b1], api_name="previous_rows")
177