ysharma HF staff commited on
Commit
adb2480
·
verified ·
1 Parent(s): 54c4f66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -13,6 +13,7 @@ import pandas as pd
13
  rekaeval = "RekaAI/VibeEval"
14
  dataset = load_dataset(rekaeval, split="test")
15
  df = pd.DataFrame(dataset)
 
16
  df_markdown = df.copy()
17
 
18
  # Function to convert URL to HTML img tag
@@ -30,6 +31,8 @@ PLACEHOLDER = """
30
  <p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Test your Vision LLMs with new Vibe-Evals from REKA</p>
31
  </div>
32
  """
 
 
33
 
34
 
35
  model_id = "xtuner/llava-llama-3-8b-v1_1-transformers"
@@ -112,12 +115,12 @@ tmp = '''with gr.Blocks(fill_height=True, ) as demo:
112
  )'''
113
 
114
  with gr.Blocks() as demo:
 
 
115
  with gr.Row():
116
  with gr.Column():
117
  gr.ChatInterface(
118
  fn=bot_streaming,
119
- title="Testing LLaVA-Llama3-8b with Reka's Vibe-Eval",
120
- description="Try [LLaVA Llama-3-8B](https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers). Upload an image and start chatting about it, or simply try one of the examples below. If you don't upload an image, you will receive an error.",
121
  stop_btn="Stop Generation",
122
  multimodal=True,
123
  textbox=chat_input,
 
13
  rekaeval = "RekaAI/VibeEval"
14
  dataset = load_dataset(rekaeval, split="test")
15
  df = pd.DataFrame(dataset)
16
+ df = df[['media_url', 'prompt']]
17
  df_markdown = df.copy()
18
 
19
  # Function to convert URL to HTML img tag
 
31
  <p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Test your Vision LLMs with new Vibe-Evals from REKA</p>
32
  </div>
33
  """
34
+ title="Testing LLaVA-Llama3-8b with Reka's Vibe-Eval",
35
+ description="Try [LLaVA Llama-3-8B](https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers). Upload an image and start chatting about it, or simply try one of the examples below. If you don't upload an image, you will receive an error.",
36
 
37
 
38
  model_id = "xtuner/llava-llama-3-8b-v1_1-transformers"
 
115
  )'''
116
 
117
  with gr.Blocks() as demo:
118
+ gr.HTML(f'<h1><center>{title}</center></h1>')
119
+ gr.HTML(f'<center>{description}</center>')
120
  with gr.Row():
121
  with gr.Column():
122
  gr.ChatInterface(
123
  fn=bot_streaming,
 
 
124
  stop_btn="Stop Generation",
125
  multimodal=True,
126
  textbox=chat_input,