mirror of
https://gitee.com/CloudOrc/SolidUI.git
synced 2025-12-06 11:59:07 +08:00
solidui requirement
This commit is contained in:
@@ -72,7 +72,7 @@ export OPENAI_API_KEY="your_api_key"
|
||||
2. **Install Dependencies**:
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
pip install -r chatgptbase.txt
|
||||
```
|
||||
|
||||
## Prepare your data:
|
||||
|
||||
4
requirements/chatgptbase.txt
Normal file
4
requirements/chatgptbase.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
openai
|
||||
colorama
|
||||
json
|
||||
tiktoken
|
||||
22
test.py
Normal file
22
test.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
# 设置参数方程
|
||||
t = np.linspace(0, 2 * np.pi, 200)
|
||||
x = 16 * np.sin(t) ** 3
|
||||
y = 13 * np.cos(t) - 5 * np.cos(2 * t) - 2 * np.cos(3 * t) - np.cos(4 * t)
|
||||
|
||||
# 创建图形和轴
|
||||
fig, ax = plt.subplots()
|
||||
|
||||
# 绘制爱心
|
||||
ax.plot(x, y, color='red')
|
||||
|
||||
# 设置坐标轴比例相同
|
||||
ax.axis('equal')
|
||||
|
||||
# 隐藏坐标轴
|
||||
ax.axis('off')
|
||||
|
||||
# 显示图形
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user