File tree 3 files changed +27
-3
lines changed
3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 32
32
docker run -p 8000:8000 pig4cloud/markitdown
33
33
```
34
34
35
- ### 2. 使用阿里云百炼平台
35
+ ### 2. 使用Gitee AI
36
+
37
+ ``` bash
38
+ docker run -d \
39
+ -p 8000:8000 \
40
+ -e API_KEY=gitee_ai_key \
41
+ -e MODEL=InternVL2_5-26B \
42
+ -e BASE_URL=https://ai.gitee.com/v1 \
43
+ pig4cloud/markitdown
44
+ ```
45
+
46
+ ### 3. 使用阿里云百炼平台
36
47
37
48
``` bash
38
49
docker run -d \
Original file line number Diff line number Diff line change
1
+ +------------------------------------------------+
2
+ | |
3
+ | 🚀 MarkItDown API Server |
4
+ | |
5
+ | ✨ Server is running... |
6
+ | |
7
+ | 🌐 http://localhost:8000/docs |
8
+ | |
9
+ | 🤖 https://ai.pig4cloud.com |
10
+ | |
11
+ +------------------------------------------------+
Original file line number Diff line number Diff line change 10
10
@asynccontextmanager
11
11
async def lifespan (app : FastAPI ):
12
12
# 启动时执行
13
- banner_path = Path (__file__ ).parent / 'banner.txt'
13
+ current_dir = Path (__file__ ).parent
14
+ banner_path = current_dir / 'app' / 'banner.txt'
15
+ print (f"Looking for banner at: { banner_path .absolute ()} " )
14
16
try :
15
17
with open (banner_path , 'r' , encoding = 'utf-8' ) as f :
16
18
banner = f .read ()
17
19
print (banner )
18
20
except FileNotFoundError :
19
- print ("Banner file not found, starting server without banner..." )
21
+ print (f "Banner file not found at { banner_path } , starting server without banner..." )
20
22
yield
21
23
22
24
def create_app () -> FastAPI :
You can’t perform that action at this time.
0 commit comments