hf1024 commited on
Commit
0b22a84
·
verified ·
1 Parent(s): a7f4f3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -6
app.py CHANGED
@@ -15,7 +15,6 @@ from requests.exceptions import RequestException
15
  import os
16
  import logging
17
  import json
18
- import GPUtil
19
 
20
  # 配置日志
21
  logging.basicConfig(level=logging.INFO)
@@ -24,11 +23,6 @@ logger = logging.getLogger(__name__)
24
  app = FastAPI()
25
  XAI_API_BASE = "https://api.x.ai/v1"
26
 
27
- cuda_available = True if len(GPUtil.getGPUs()) else False
28
- if cuda_available:
29
- print(GPUtil.getGPUs()[0].name)
30
- print(cuda_available)
31
-
32
 
33
  class ChatRequest(BaseModel):
34
  messages: list[dict] = Field(..., description="消息列表")
 
15
  import os
16
  import logging
17
  import json
 
18
 
19
  # 配置日志
20
  logging.basicConfig(level=logging.INFO)
 
23
  app = FastAPI()
24
  XAI_API_BASE = "https://api.x.ai/v1"
25
 
 
 
 
 
 
26
 
27
  class ChatRequest(BaseModel):
28
  messages: list[dict] = Field(..., description="消息列表")