Spaces:
Runtime error
Runtime error
linting
Browse files
app.py
CHANGED
|
@@ -2,16 +2,9 @@ import gradio as gr
|
|
| 2 |
from transformers import AutoProcessor, AutoModelForCausalLM
|
| 3 |
import spaces
|
| 4 |
|
| 5 |
-
import requests
|
| 6 |
-
import copy
|
| 7 |
|
| 8 |
-
from PIL import Image
|
| 9 |
-
import io
|
| 10 |
-
import matplotlib.pyplot as plt
|
| 11 |
-
import matplotlib.patches as patches
|
| 12 |
|
| 13 |
-
import random
|
| 14 |
-
import numpy as np
|
| 15 |
|
| 16 |
import subprocess
|
| 17 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
|
@@ -78,7 +71,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 78 |
gr.Examples(
|
| 79 |
examples=[
|
| 80 |
["idefics2_architecture.png", 'How many tokens per image does it use?'],
|
| 81 |
-
["idefics2_architecture.png",
|
| 82 |
["idefics2_architecture.png", 'Up to which size can the images be?'],
|
| 83 |
["image.jpg", "What's the share of Industry Switchers Gained?"]
|
| 84 |
],
|
|
|
|
| 2 |
from transformers import AutoProcessor, AutoModelForCausalLM
|
| 3 |
import spaces
|
| 4 |
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
from PIL import Image
|
|
|
|
|
|
|
|
|
|
| 7 |
|
|
|
|
|
|
|
| 8 |
|
| 9 |
import subprocess
|
| 10 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
|
|
|
| 71 |
gr.Examples(
|
| 72 |
examples=[
|
| 73 |
["idefics2_architecture.png", 'How many tokens per image does it use?'],
|
| 74 |
+
["idefics2_architecture.png", "What type of encoder does the model use?"],
|
| 75 |
["idefics2_architecture.png", 'Up to which size can the images be?'],
|
| 76 |
["image.jpg", "What's the share of Industry Switchers Gained?"]
|
| 77 |
],
|