roopalgarg commited on
Commit
4558ce4
1 Parent(s): 62557b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,13 +4,13 @@ from datasets import load_dataset
4
  import random
5
 
6
  auth_token = os.environ.get("auth_token")
7
- iiw_400 = load_dataset('google/imageinwords', token=auth_token, name="IIW-400")
8
 
9
  def display_iiw_data(index):
10
  data = iiw_400['test'][index]
11
  image_html = f'<img src="{data["image/url"]}" style="width:100%; max-width:800px; height:auto;">'
12
- iiw_text = f"<h2>IIW Human Descriptions:</h2><p style='font-size: 16px'>{data['IIW']}</p>"
13
- iiw_p5b_text = f"<h2>IIW PaLI 5B Predictions:</h2><p style='font-size: 16px'>{data['IIW-P5B']}</p>"
14
  ratings = "<h2>Ratings:</h2>"
15
  if data['iiw-human-sxs-iiw-p5b'] is not None:
16
  for key, value in data['iiw-human-sxs-iiw-p5b'].items():
 
4
  import random
5
 
6
  auth_token = os.environ.get("auth_token")
7
+ iiw_400 = load_dataset('google/imageinwords', token=auth_token, trust_remote_code=True, name="IIW-400")
8
 
9
  def display_iiw_data(index):
10
  data = iiw_400['test'][index]
11
  image_html = f'<img src="{data["image/url"]}" style="width:100%; max-width:800px; height:auto;">'
12
+ iiw_text = f"<h2>IIW Human-Authored Descriptions:</h2><p style='font-size: 16px'>{data['IIW']}</p>"
13
+ iiw_p5b_text = f"<h2>IIW PaLI-5B Generated Descriptions:</h2><p style='font-size: 16px'>{data['IIW-P5B']}</p>"
14
  ratings = "<h2>Ratings:</h2>"
15
  if data['iiw-human-sxs-iiw-p5b'] is not None:
16
  for key, value in data['iiw-human-sxs-iiw-p5b'].items():