ikraamkb commited on
Commit
c77309c
Β·
verified Β·
1 Parent(s): 9a2af53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -16,15 +16,11 @@ import easyocr
16
  # Initialize FastAPI
17
  app = FastAPI()
18
 
19
- # Load AI Model for Question Answering on Documents (Mistral-7B)
20
- model_name = "TinyLlama/TinyLlama-1.1B-chat"
21
  print(f"πŸ”„ Loading models")
22
 
23
- doc_qa_pipeline = pipeline("text-generation", model=model)
24
-
25
- # Load Image Captioning Model (nlpconnect/vit-gpt2-image-captioning)
26
  image_captioning_pipeline = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
27
-
28
  # Initialize OCR Model (Lazy Load)
29
  reader = easyocr.Reader(["en"], gpu=True)
30
 
 
16
  # Initialize FastAPI
17
  app = FastAPI()
18
 
 
 
19
  print(f"πŸ”„ Loading models")
20
 
21
+ doc_qa_pipeline = pipeline("text-generation", model="TinyLlama/TinyLlama-1.1B-chat")
 
 
22
  image_captioning_pipeline = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
23
+ print("models loaded")
24
  # Initialize OCR Model (Lazy Load)
25
  reader = easyocr.Reader(["en"], gpu=True)
26