MuskAI commited on
Commit
6f32ee8
·
verified ·
1 Parent(s): ba9f863

Add model card and usage instructions

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -80,6 +80,24 @@ The API returns L1/L2/fusion scores, the selected label and the view count.
80
  Loading the model does not download external weights after this repository
81
  has been downloaded. It uses `backbones/ViT-L-14.pt`.
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  ## Checkpoint identity and provenance
84
 
85
  `weights/epoch_20.pth` is the original core state_dict (not `best.pth`):
 
80
  Loading the model does not download external weights after this repository
81
  has been downloaded. It uses `backbones/ViT-L-14.pt`.
82
 
83
+ ## Run the web demo locally
84
+
85
+ The tested Gradio UI is included in `demo/`. From the downloaded model directory:
86
+
87
+ ```bash
88
+ python -m pip install -r demo/requirements.txt
89
+ LTF_MODEL_DIR="$PWD" python demo/app.py
90
+ ```
91
+
92
+ Open `http://localhost:7860`. For a remote server, forward port 7860 over SSH.
93
+ Upload an original file, click **Detect**, and inspect fusion, L1 and L2 scores.
94
+ The preview is for display only; inference uses the original file's bytes.
95
+
96
+ The demo also supports deployment as a separate Gradio Space. Set
97
+ `LTF_MODEL_REPO` to this model ID and `LTF_MODEL_REVISION` to a commit SHA.
98
+ Creating the online compute Space requires an eligible Hugging Face account.
99
+ Publishing the model repository alone does not start a hosted inference service.
100
+
101
  ## Checkpoint identity and provenance
102
 
103
  `weights/epoch_20.pth` is the original core state_dict (not `best.pth`):