Pujan-Dev commited on
Commit
ec0654b
·
1 Parent(s): c1e7df5

doc: documented all the functions that we have done till now

Browse files
Files changed (4) hide show
  1. .gitignore +1 -0
  2. docs/api_endpoints.md +17 -0
  3. docs/deployment.md +2 -0
  4. docs/functions.md +11 -1
.gitignore CHANGED
@@ -60,3 +60,4 @@ models/.gitattributes #<-- This line can stay if you only want to ignore that f
60
 
61
  todo.md
62
  np_text_model
 
 
60
 
61
  todo.md
62
  np_text_model
63
+ IMG_models
docs/api_endpoints.md CHANGED
@@ -73,3 +73,20 @@ curl -X POST http://localhost:8000/NP/upload \
73
  -F 'file=@NepaliText.pdf;type=application/pdf'
74
  ```
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  -F 'file=@NepaliText.pdf;type=application/pdf'
74
  ```
75
 
76
+
77
+ ### Image-Classification -`/verify-image/`
78
+
79
+ | Endpoint | Method | Description |
80
+ | --------------------------------- | ------ | ----------------------------------------- |
81
+ | `/verify-image/analyse` | POST | Classify Image using ML |
82
+
83
+
84
+ #### Example: Image-Classification
85
+ ```bash
86
+ curl -X POST http://localhost:8000/verify-image/analyse \
87
+ -H "Authorization: Bearer <SECRET_TOKEN>" \
88
+ -F 'file=@test1.png'
89
+ ```
90
+
91
+
92
+
docs/deployment.md CHANGED
@@ -103,3 +103,5 @@ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
103
 
104
  Happy deploying!
105
  **P.S.** Try not to break stuff. 😅
 
 
 
103
 
104
  Happy deploying!
105
  **P.S.** Try not to break stuff. 😅
106
+
107
+
docs/functions.md CHANGED
@@ -49,5 +49,15 @@
49
 
50
  - **`analyze_sentence_file()`**
51
  Like `handle_file_sentence()`—analyzes sentences in uploaded files.
52
-
53
  ## for image_classifier
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  - **`analyze_sentence_file()`**
51
  Like `handle_file_sentence()`—analyzes sentences in uploaded files.
52
+ ---
53
  ## for image_classifier
54
+
55
+
56
+
57
+ - **`Classify_Image_router()`** – Handles image classification requests by routing and coordinating preprocessing and inference.
58
+ - **`classify_image()`** – Performs AI vs human image classification using the loaded model.
59
+ - **`load_model()`** – Loads the pretrained model from Hugging Face at server startup.
60
+ - **`preprocess_image()`** – Applies all required preprocessing steps to the input image.
61
+
62
+
63
+