iflamed commited on
Commit
75cb175
·
unverified ·
1 Parent(s): ee5cb5d

add http client demo for python

Browse files
Files changed (1) hide show
  1. README.md +6 -2
README.md CHANGED
@@ -125,10 +125,14 @@ The `runtime/python/fastapi_server.py` file contains the http API build with `Fa
125
  cd runtime/python
126
  # Set inference model
127
  export MODEL_DIR=pretrained_models/CosyVoice-300M-Instruct
 
128
  # For development
129
- fastapi dev --port 6006 fastapi_server.py
130
  # For production
131
- fastapi run --port 6006 fastapi_server.py
 
 
 
132
  ```
133
 
134
  **Build for deployment**
 
125
  cd runtime/python
126
  # Set inference model
127
  export MODEL_DIR=pretrained_models/CosyVoice-300M-Instruct
128
+
129
  # For development
130
+ fastapi dev --port 6006 fastapi_server.py
131
  # For production
132
+ fastapi run --port 6006 fastapi_server.py
133
+
134
+ # Call the API with python client
135
+ python fastapi_client.py --api_base http://127.0.0.1:6006 --mode cross_lingual --tts_wav ./demo.wav
136
  ```
137
 
138
  **Build for deployment**