blasisd commited on
Commit
4edc9ed
·
1 Parent(s): 39f56fe

Updated README.md adding a How to Use section

Browse files
Files changed (1) hide show
  1. README.md +33 -0
README.md CHANGED
@@ -78,6 +78,36 @@ python -m uvicorn main:app --host 0.0.0.0 --port 7860 --reload
78
  > [!WARNING]
79
  > Ensure you are in the project's **src** directory before running the script or adapt running path (i.e. `python -m uvicorn src.main:app --host 0.0.0.0 --port 7860 --reload`).
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  ## Deployment
82
 
83
  ### Deployment on Hugging Face Spaces
@@ -98,6 +128,8 @@ To deploy the project on Hugging Face Spaces, follow these steps:
98
  docker build -t musheff-api .
99
  ```
100
 
 
 
101
  - Run a container based on the image:
102
 
103
  ```bash
@@ -139,3 +171,4 @@ For deployment on other cloud or live systems, consult the documentation provide
139
  ## Authors
140
 
141
  **Vlasios Dimitriadis** - _Initial work:_ [Musheff API](https://huggingface.co/spaces/blasisd/musheff-api)
 
 
78
  > [!WARNING]
79
  > Ensure you are in the project's **src** directory before running the script or adapt running path (i.e. `python -m uvicorn src.main:app --host 0.0.0.0 --port 7860 --reload`).
80
 
81
+ ## How to Use
82
+
83
+ The API exposes a classification endpoint at `/classify` that accepts mushroom images and returns:
84
+
85
+ - Predicted mushroom species
86
+ - Edibility status (edible/poisonous)
87
+ - Confidence score
88
+
89
+ ### API Endpoint
90
+
91
+ `POST /classify`
92
+
93
+ ### Request Format
94
+
95
+ ```bash
96
+ curl -X POST "http://<your-api-url>/classify" \
97
+ -H "Content-Type: multipart/form-data" \
98
+ -F "image_file=@path/to/mushroom.jpg"
99
+ ```
100
+
101
+ ### Example Response
102
+
103
+ ```bash
104
+ {
105
+ "mushroom_type": "Pleurotus_ostreatus",
106
+ "toxicity_profile": "edible",
107
+ "confidence": 0.5491
108
+ }
109
+ ```
110
+
111
  ## Deployment
112
 
113
  ### Deployment on Hugging Face Spaces
 
128
  docker build -t musheff-api .
129
  ```
130
 
131
+ ````
132
+
133
  - Run a container based on the image:
134
 
135
  ```bash
 
171
  ## Authors
172
 
173
  **Vlasios Dimitriadis** - _Initial work:_ [Musheff API](https://huggingface.co/spaces/blasisd/musheff-api)
174
+ ````