From ad79a5de55cd496e4662ba25698b2652a784a8ef Mon Sep 17 00:00:00 2001 From: Haotian Liu Date: Fri, 2 Feb 2024 21:36:32 -0600 Subject: [PATCH] Fix --- llava/serve/gradio_web_server.py | 3 ++- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/llava/serve/gradio_web_server.py b/llava/serve/gradio_web_server.py index c159a482b..f53e9a139 100644 --- a/llava/serve/gradio_web_server.py +++ b/llava/serve/gradio_web_server.py @@ -337,7 +337,8 @@ def build_demo(embed_mode, cur_dir=None, concurrency_count=10): value="Default", label="Preprocess for non-square image", visible=False) - cur_dir = os.path.dirname(os.path.abspath(__file__)) + if cur_dir is None: + cur_dir = os.path.dirname(os.path.abspath(__file__)) gr.Examples(examples=[ [f"{cur_dir}/examples/extreme_ironing.jpg", "What is unusual about this image?"], [f"{cur_dir}/examples/waterview.jpg", "What are the things I should be cautious about when I visit here?"], diff --git a/pyproject.toml b/pyproject.toml index c7ed59702..257af48a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "llava" -version = "1.2.1.post2" +version = "1.2.1.post4" description = "Towards GPT-4 like large language and visual assistant." readme = "README.md" requires-python = ">=3.8" @@ -16,7 +16,7 @@ dependencies = [ "torch==2.0.1", "torchvision==0.15.2", "transformers==4.36.2", "tokenizers==0.15.0", "sentencepiece==0.1.99", "shortuuid", "accelerate==0.21.0", "peft==0.4.0", "bitsandbytes==0.41.0", - "pydantic<2,>=1", "markdown2[all]", "numpy", "scikit-learn==1.2.2", + "pydantic", "markdown2[all]", "numpy", "scikit-learn==1.2.2", "gradio==4.16.0", "gradio_client==0.8.1", "requests", "httpx==0.24.0", "uvicorn", "fastapi", "einops==0.6.1", "einops-exts==0.0.4", "timm==0.6.13",