blasisd commited on
Commit
99bb9dd
Β·
1 Parent(s): 9b6a6a6

Changed endpoint variable logic to base url variable logic.

Browse files
Files changed (2) hide show
  1. README.md +7 -1
  2. src/app.py +1 -1
README.md CHANGED
@@ -45,10 +45,16 @@ To set up and run this project, ensure the following software and tools are inst
45
  ```
46
 
47
  - **Backend server**: This project is the frontend component only. Before proceeding, ensure you've deployed the backend server:
 
48
  1. **Deploy the backend:**
49
  - Implementation β†’ [blasisd/musheff-api](https://huggingface.co/spaces/blasisd/musheff-api/tree/main).
50
  2. **Configure environment variable:**
51
- - Set `MUSHEFF_API_ENDPOINT` in your environment to point to your live backend URL.
 
 
 
 
 
52
 
53
  ### Local Development and Testing
54
 
 
45
  ```
46
 
47
  - **Backend server**: This project is the frontend component only. Before proceeding, ensure you've deployed the backend server:
48
+
49
  1. **Deploy the backend:**
50
  - Implementation β†’ [blasisd/musheff-api](https://huggingface.co/spaces/blasisd/musheff-api/tree/main).
51
  2. **Configure environment variable:**
52
+
53
+ - Set `MUSHEFF_API_BASE_URL` variable in your environment to your backend's root URL:
54
+
55
+ ```bash
56
+ MUSHEFF_API_BASE_URL="https://your-backend-server.com" # No trailing slash!
57
+ ```
58
 
59
  ### Local Development and Testing
60
 
src/app.py CHANGED
@@ -10,7 +10,7 @@ from dotenv import load_dotenv
10
  load_dotenv()
11
 
12
 
13
- API_ENDPOINT = os.getenv("MUSHEFF_API_ENDPOINT")
14
 
15
 
16
  def classify_image(img_path: str) -> tuple[dict[str, Any]]:
 
10
  load_dotenv()
11
 
12
 
13
+ API_ENDPOINT = f"{os.getenv('MUSHEFF_API_BASE_URL')}/classify"
14
 
15
 
16
  def classify_image(img_path: str) -> tuple[dict[str, Any]]: