Revert
Browse files- README.md +13 -16
- query.py +0 -31
- requirements.txt +0 -2
README.md
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Specialist
|
2 |
|
3 |
## Install
|
@@ -17,19 +30,3 @@ bash run.sh
|
|
17 |
```
|
18 |
|
19 |
## Example
|
20 |
-
|
21 |
-
## Hugging Face
|
22 |
-
---
|
23 |
-
title: DocAnalysis Qwen2.5 1.5B Instruct
|
24 |
-
emoji: π
|
25 |
-
colorFrom: blue
|
26 |
-
colorTo: red
|
27 |
-
sdk: gradio
|
28 |
-
sdk_version: 5.20.0
|
29 |
-
app_file: app.py
|
30 |
-
pinned: false
|
31 |
-
license: mit
|
32 |
-
short_description: Document Analysis using QWEN 2.5 1.5B Instruct model
|
33 |
-
---
|
34 |
-
|
35 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
---
|
2 |
+
title: DocAnalysis Qwen2.5 1.5B Instruct
|
3 |
+
emoji: π
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: red
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 5.20.0
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: mit
|
11 |
+
short_description: Document Analysis using QWEN 2.5 1.5B Instruct model
|
12 |
+
---
|
13 |
+
|
14 |
# Specialist
|
15 |
|
16 |
## Install
|
|
|
30 |
```
|
31 |
|
32 |
## Example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query.py
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
# chat
|
2 |
-
from QWEN import ChatQWEN
|
3 |
-
from langchain_core.prompts import ChatPromptTemplate
|
4 |
-
|
5 |
-
# prompt chat
|
6 |
-
prompt = ChatPromptTemplate(
|
7 |
-
[
|
8 |
-
(
|
9 |
-
"system",
|
10 |
-
"You are Qwen, created by Alibaba Cloud. You are a helpful assistant that translates {input_language} to {output_language}.",
|
11 |
-
),
|
12 |
-
("human", "{input}"),
|
13 |
-
]
|
14 |
-
)
|
15 |
-
|
16 |
-
# model creation
|
17 |
-
llm = ChatQWEN()
|
18 |
-
|
19 |
-
# pipeline
|
20 |
-
chain = prompt | llm
|
21 |
-
|
22 |
-
# query
|
23 |
-
print(
|
24 |
-
chain.invoke(
|
25 |
-
{
|
26 |
-
"input_language": "English",
|
27 |
-
"output_language": "German",
|
28 |
-
"input": "I love programming",
|
29 |
-
}
|
30 |
-
).content
|
31 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -7,8 +7,6 @@ unstructured==0.16.23
|
|
7 |
unstructured[md]==0.16.23
|
8 |
gradio==5.19.0
|
9 |
# QWEN libs
|
10 |
-
torch==2.4.1
|
11 |
-
langchain-deepseek==0.1.2
|
12 |
torch==2.4.1
|
13 |
triton==3.0.0
|
14 |
transformers==4.46.3
|
|
|
7 |
unstructured[md]==0.16.23
|
8 |
gradio==5.19.0
|
9 |
# QWEN libs
|
|
|
|
|
10 |
torch==2.4.1
|
11 |
triton==3.0.0
|
12 |
transformers==4.46.3
|