Spaces:
Running
Running
littlebird13
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -12,13 +12,13 @@ from urllib3.exceptions import HTTPError
|
|
12 |
|
13 |
from pathlib import Path
|
14 |
|
15 |
-
os.environ['DASHSCOPE_HTTP_BASE_URL'] = 'https://dashscope.aliyuncs.com/api/v1'
|
16 |
-
# os.environ['DASHSCOPE_WEBSOCKET_BASE_URL'] = 'https://poc-dashscope.aliyuncs.com/api-ws/v1/inference'
|
17 |
|
18 |
import dashscope
|
19 |
from dashscope import MultiModalConversation
|
20 |
API_KEY = os.environ['API_KEY']
|
|
|
21 |
dashscope.api_key = API_KEY
|
|
|
22 |
|
23 |
is_modelscope_studio = os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio'
|
24 |
|
|
|
12 |
|
13 |
from pathlib import Path
|
14 |
|
|
|
|
|
15 |
|
16 |
import dashscope
|
17 |
from dashscope import MultiModalConversation
|
18 |
API_KEY = os.environ['API_KEY']
|
19 |
+
BASE_URL = os.environ['DASHSCOPE_HTTP_BASE_URL']
|
20 |
dashscope.api_key = API_KEY
|
21 |
+
dashscope.base_http_api_url = BASE_URL
|
22 |
|
23 |
is_modelscope_studio = os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio'
|
24 |
|