Skip to content

Commit

Permalink
release version 0.0.1 and upload it to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhahaha authored and JianxinMa committed Apr 7, 2024
1 parent eeab80d commit 94ad2bb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
5 changes: 0 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
include qwen_server/img/*
include qwen_server/css/*
include qwen_server/js/*
include qwen_server/*.json
recursive-include browser_qwen *
include qwen_agent/utils/qwen.tiktoken
recursive-include qwen_agent/tools/resource *
3 changes: 2 additions & 1 deletion qwen_agent/memory/memory.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
from typing import Dict, Iterator, List, Optional, Union

import json5
Expand Down Expand Up @@ -83,7 +84,7 @@ def _run(self,
logger.info(keyword)
keyword_dict = json5.loads(keyword)
keyword_dict['text'] = query
query = keyword_dict
query = json.dumps(keyword_dict, ensure_ascii=False)
except Exception:
query = query

Expand Down
11 changes: 10 additions & 1 deletion qwen_server/assistant_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
except ImportError:
pass

import gradio as gr
try:
import gradio as gr
if gr.__version__ < '3.50' or gr.__version__ >= '4.0':
raise ImportError(
'Incompatible gradio version detected. '
'Please install the correct version with: pip install "gradio>=3.50,<4.0"'
)
except (ModuleNotFoundError, AttributeError):
raise ImportError(
'Please install gradio by: pip install "gradio>=3.50,<4.0"')
import jsonlines

from qwen_agent.agents import DocQAAgent
Expand Down
11 changes: 10 additions & 1 deletion qwen_server/workstation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
import os
from pathlib import Path

import gradio as gr
try:
import gradio as gr
if gr.__version__ < '3.50' or gr.__version__ >= '4.0':
raise ImportError(
'Incompatible gradio version detected. '
'Please install the correct version with: pip install "gradio>=3.50,<4.0"'
)
except (ModuleNotFoundError, AttributeError):
raise ImportError(
'Please install gradio by: pip install "gradio>=3.50,<4.0"')
import json5

try:
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ beautifulsoup4
dashscope>=1.11.0
docx2txt
fastapi>=0.103.1
gradio<4.0.0
gradio-client>=0.5.0
html2text
jieba
json5
Expand All @@ -14,15 +12,11 @@ matplotlib
numpy
openai
pandas
pdf2image
pdfminer-six
pillow
pydantic>=2.3.0
pypdf
python-pptx
seaborn
sympy
tiktoken
unstructured==0.8.0
uvicorn>=0.23.2
wordcloud
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ def read_requirements():
setup(
name='qwen_agent',
version='0.0.1',
packages=find_packages(),
packages=find_packages(
exclude=['examples', 'examples.*', 'qwen_server', 'qwen_server.*']),
package_data={
'qwen_agent':
['utils/qwen.tiktoken', 'tools/resource/*.ttf', 'tools/resource/*.py'],
},
install_requires=read_requirements(),
)
url='https://github.com/QwenLM/Qwen-Agent')

0 comments on commit 94ad2bb

Please sign in to comment.