misc: add pre-commit config (#637)
This commit is contained in:
@@ -14,16 +14,13 @@ Output:
|
||||
|
||||
import argparse
|
||||
import asyncio
|
||||
import copy
|
||||
import json
|
||||
import time
|
||||
import copy
|
||||
|
||||
import aiohttp
|
||||
import requests
|
||||
|
||||
from llava.conversation import (
|
||||
conv_llava_llama_3,
|
||||
)
|
||||
from llava.conversation import conv_llava_llama_3
|
||||
|
||||
|
||||
async def send_request(url, data, delay=0):
|
||||
|
||||
@@ -14,16 +14,13 @@ Output:
|
||||
|
||||
import argparse
|
||||
import asyncio
|
||||
import copy
|
||||
import json
|
||||
import time
|
||||
import copy
|
||||
|
||||
import aiohttp
|
||||
import requests
|
||||
|
||||
from llava.conversation import (
|
||||
conv_qwen
|
||||
)
|
||||
from llava.conversation import conv_qwen
|
||||
|
||||
|
||||
async def send_request(url, data, delay=0):
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
Usage: python3 srt_example_llava.py
|
||||
"""
|
||||
|
||||
import sglang as sgl
|
||||
from sglang.srt.utils import load_image
|
||||
from sglang.lang.chat_template import get_chat_template
|
||||
|
||||
from PIL import ImageFile
|
||||
|
||||
import sglang as sgl
|
||||
from sglang.lang.chat_template import get_chat_template
|
||||
from sglang.srt.utils import load_image
|
||||
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = True # Allow loading of truncated images
|
||||
|
||||
|
||||
@sgl.function
|
||||
def image_qa(s, image, question):
|
||||
s += sgl.user(sgl.image(image) + question)
|
||||
|
||||
Reference in New Issue
Block a user