improved readme using chatgpt
Browse files
README.md
CHANGED
|
@@ -8,30 +8,62 @@ app_file: README.md
|
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
```shell
|
| 15 |
python3 -m venv .venv && source .venv/bin/activate
|
| 16 |
```
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
```shell
|
| 19 |
pip install -r requirements.txt
|
| 20 |
```
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
```shell
|
| 24 |
beam configure default --token [TOKEN]
|
| 25 |
```
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
```shell
|
| 28 |
beam deploy app.py:server
|
| 29 |
```
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
```shell
|
| 32 |
curl -X POST 'https://[ID].app.beam.cloud/stream' \
|
| 33 |
-H 'Connection: keep-alive' \
|
| 34 |
-H 'Content-Type: application/json' \
|
| 35 |
-H 'Authorization: Bearer [TOKEN]' \
|
| 36 |
-d '{"prompt": "", "posts_count": 5}'
|
| 37 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# How to Use
|
| 12 |
+
|
| 13 |
+
Follow these steps to set up and deploy your application on [Beam](https://beam.cloud/)
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## 1. Create an Account on Beam
|
| 18 |
+
Sign up at [Beam](https://platform.beam.cloud/).
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## 2. Set Up a Python Virtual Environment
|
| 23 |
+
Create and activate a Python virtual environment:
|
| 24 |
```shell
|
| 25 |
python3 -m venv .venv && source .venv/bin/activate
|
| 26 |
```
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
## 3. Install Required Packages
|
| 31 |
+
Install the dependencies listed in the `requirements.txt` file:
|
| 32 |
```shell
|
| 33 |
pip install -r requirements.txt
|
| 34 |
```
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## 4. Register Your Beam API Token
|
| 39 |
+
Retrieve your API token from the [API Keys](https://platform.beam.cloud/settings/api-keys) page on the Beam dashboard. Then, configure Beam with your token:
|
| 40 |
```shell
|
| 41 |
beam configure default --token [TOKEN]
|
| 42 |
```
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## 5. Deploy Your Application on Beam
|
| 47 |
+
Deploy your application using the following command:
|
| 48 |
```shell
|
| 49 |
beam deploy app.py:server
|
| 50 |
```
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## 6. Call the Stream Endpoint
|
| 55 |
+
Make a POST request to your deployed stream endpoint:
|
| 56 |
```shell
|
| 57 |
curl -X POST 'https://[ID].app.beam.cloud/stream' \
|
| 58 |
-H 'Connection: keep-alive' \
|
| 59 |
-H 'Content-Type: application/json' \
|
| 60 |
-H 'Authorization: Bearer [TOKEN]' \
|
| 61 |
-d '{"prompt": "", "posts_count": 5}'
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
|
| 66 |
+
## 7. Enjoy Your Free Trial
|
| 67 |
+
Enjoy 15 hours of free trial usage on Beam!
|
| 68 |
+
|
| 69 |
+
---
|