1
0
This commit is contained in:
2024-06-02 21:57:10 +08:00
parent 2527821390
commit e03a7de8f9
3 changed files with 1 additions and 15 deletions

View File

@@ -12,9 +12,7 @@ conda activate pt
# 安装 pytorch v1.12版本已经正式支持了用于mac m1芯片gpu加速的mps后端 # 安装 pytorch v1.12版本已经正式支持了用于mac m1芯片gpu加速的mps后端
conda install pytorch::pytorch torchvision torchaudio -c pytorch -y conda install pytorch::pytorch torchvision torchaudio -c pytorch -y
pip install numpy pip install -r requirements
pip install pandas
pip install matplotlib
``` ```
## gpt4free ## gpt4free

11
gpt.py
View File

@@ -1,11 +0,0 @@
from g4f.client import Client
content = "张量在机器学习中的主要用途"
client = Client()
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": content}],
)
print(response.choices[0].message.content)

View File

@@ -4,5 +4,4 @@ torchaudio
pandas pandas
matplotlib matplotlib
numpy numpy
g4f
pillow pillow