mirror of
https://github.com/deepseek-ai/DeepSeek-VL.git
synced 2025-04-19 10:09:09 -04:00
fix: update dependencies
This commit is contained in:
parent
64f1388bd0
commit
211882599f
@ -177,6 +177,8 @@ python cli_chat.py --model_path "local model path"
|
|||||||
|
|
||||||
### Gradio Demo
|
### Gradio Demo
|
||||||
```bash
|
```bash
|
||||||
|
pip install -e .[gradio]
|
||||||
|
|
||||||
python deepseek_vl/serve/app_deepseek.py
|
python deepseek_vl/serve/app_deepseek.py
|
||||||
```
|
```
|
||||||

|

|
||||||
|
@ -316,6 +316,9 @@ def retry(
|
|||||||
|
|
||||||
|
|
||||||
def build_demo(MODELS):
|
def build_demo(MODELS):
|
||||||
|
with open("deepseek_vl/serve/assets/custom.css", "r", encoding="utf-8") as f:
|
||||||
|
customCSS = f.read()
|
||||||
|
|
||||||
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
||||||
history = gr.State([])
|
history = gr.State([])
|
||||||
input_text = gr.State()
|
input_text = gr.State()
|
||||||
@ -359,7 +362,7 @@ def build_demo(MODELS):
|
|||||||
with gr.Column():
|
with gr.Column():
|
||||||
image_box = gr.Image(type="pil")
|
image_box = gr.Image(type="pil")
|
||||||
|
|
||||||
with gr.Tab(label="Parameter Setting") as _:
|
with gr.Tab(label="Parameter Setting") as parameter_row:
|
||||||
top_p = gr.Slider(
|
top_p = gr.Slider(
|
||||||
minimum=-0,
|
minimum=-0,
|
||||||
maximum=1.0,
|
maximum=1.0,
|
||||||
|
@ -24,6 +24,7 @@ import html
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
import os
|
||||||
|
|
||||||
import mdtex2html
|
import mdtex2html
|
||||||
from app_modules.presets import ALREADY_CONVERTED_MARK
|
from app_modules.presets import ALREADY_CONVERTED_MARK
|
||||||
@ -40,6 +41,7 @@ def configure_logger():
|
|||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
timestr = time.strftime("%Y%m%d-%H%M%S")
|
timestr = time.strftime("%Y%m%d-%H%M%S")
|
||||||
|
os.makedirs("deepseek_vl/serve/logs", exist_ok=True)
|
||||||
file_handler = logging.FileHandler(
|
file_handler = logging.FileHandler(
|
||||||
f"deepseek_vl/serve/logs/{timestr}_gradio_log.log"
|
f"deepseek_vl/serve/logs/{timestr}_gradio_log.log"
|
||||||
)
|
)
|
||||||
|
@ -15,12 +15,25 @@ dependencies = [
|
|||||||
"torch>=2.0.1",
|
"torch>=2.0.1",
|
||||||
"transformers>=4.38.2",
|
"transformers>=4.38.2",
|
||||||
"timm>=0.9.16",
|
"timm>=0.9.16",
|
||||||
"gradio>=4.13.0",
|
|
||||||
"accelerate",
|
"accelerate",
|
||||||
"sentencepiece",
|
"sentencepiece",
|
||||||
"attrdict",
|
"attrdict",
|
||||||
"einops",
|
"einops",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
gradio = [
|
||||||
|
"gradio==3.48.0",
|
||||||
|
"gradio-client==0.6.1",
|
||||||
|
"mdtex2html==1.3.0",
|
||||||
|
"pypinyin==0.50.0",
|
||||||
|
"tiktoken==0.5.2",
|
||||||
|
"tqdm==4.64.0",
|
||||||
|
"colorama==0.4.5",
|
||||||
|
"Pygments==2.12.0",
|
||||||
|
"markdown==3.4.1",
|
||||||
|
"SentencePiece==0.1.96"
|
||||||
|
]
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
packages = {find = {exclude = ["images"]}}
|
packages = {find = {exclude = ["images"]}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
torch>=2.0.1
|
torch==2.0.1
|
||||||
transformers>=4.38.2
|
transformers>=4.38.2
|
||||||
timm>=0.9.16
|
timm>=0.9.16
|
||||||
accelerate
|
accelerate
|
||||||
@ -7,17 +7,13 @@ attrdict
|
|||||||
einops
|
einops
|
||||||
|
|
||||||
# for gradio demo
|
# for gradio demo
|
||||||
gradio==3.27.0
|
gradio==3.48.0
|
||||||
mdtex2html
|
gradio-client==0.6.1
|
||||||
pypinyin
|
mdtex2html==1.3.0
|
||||||
tiktoken
|
pypinyin==0.50.0
|
||||||
socksio
|
tiktoken==0.5.2
|
||||||
tqdm
|
tqdm==4.64.0
|
||||||
colorama
|
colorama==0.4.5
|
||||||
duckduckgo_search
|
Pygments==2.12.0
|
||||||
Pygments
|
markdown==3.4.1
|
||||||
llama_index
|
SentencePiece==0.1.96
|
||||||
langchain
|
|
||||||
markdown
|
|
||||||
markdown2
|
|
||||||
SentencePiece
|
|
||||||
|
Loading…
Reference in New Issue
Block a user