KeerthiVM commited on
Commit
f451981
·
1 Parent(s): 3c32556

Removed secrets from history

Browse files
Files changed (2) hide show
  1. app.py +8 -1
  2. requirements.txt +2 -6
app.py CHANGED
@@ -19,6 +19,8 @@ from eva_vit import create_eva_vit_g
19
  import requests
20
  from io import BytesIO
21
  import os
 
 
22
 
23
  token = os.getenv("HF_TOKEN")
24
  if not token:
@@ -379,7 +381,12 @@ class SkinGPT4(nn.Module):
379
 
380
 
381
  def load_model(model_path):
382
- model = SkinGPT4(vit_checkpoint_path="dermnet_finetuned_version1.pth")
 
 
 
 
 
383
  model.to(device)
384
  model.eval()
385
  return model
 
19
  import requests
20
  from io import BytesIO
21
  import os
22
+ from huggingface_hub import hf_hub_download
23
+
24
 
25
  token = os.getenv("HF_TOKEN")
26
  if not token:
 
381
 
382
 
383
  def load_model(model_path):
384
+ model_path = hf_hub_download(
385
+ repo_id="KeerthiVM/SkinCancerDiagnosis",
386
+ filename="dermnet_finetuned_version1.pth",
387
+ )
388
+ # model = SkinGPT4(vit_checkpoint_path="dermnet_finetuned_version1.pth")
389
+ model = SkinGPT4(vit_checkpoint_path=model_path)
390
  model.to(device)
391
  model.eval()
392
  return model
requirements.txt CHANGED
@@ -8,12 +8,8 @@ pillow
8
  fpdf
9
  nest_asyncio
10
  sentencepiece
11
- qdrant_client
12
- langchain
13
- langchain_community
14
  scikit-learn
15
- langchain_openai
16
  nest_asyncio
17
  sentence_transformers
18
- langchain-qdrant
19
- huggingface_hub
 
8
  fpdf
9
  nest_asyncio
10
  sentencepiece
 
 
 
11
  scikit-learn
 
12
  nest_asyncio
13
  sentence_transformers
14
+ huggingface_hub
15
+ timm