Sai Anoushka
commited on
Commit
Β·
ff2df60
1
Parent(s):
f0908ee
Add application file
Browse files
app.py
CHANGED
|
@@ -22,8 +22,8 @@ app.add_middleware(
|
|
| 22 |
|
| 23 |
# Load GIT-base model and processor
|
| 24 |
print("π Loading microsoft/git-base-coco model...")
|
| 25 |
-
processor = GitProcessor.from_pretrained("microsoft/git-base-coco")
|
| 26 |
-
model = AutoModelForCausalLM.from_pretrained("microsoft/git-base-coco", torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32)
|
| 27 |
print("β
Model loaded!")
|
| 28 |
|
| 29 |
@app.get("/")
|
|
|
|
| 22 |
|
| 23 |
# Load GIT-base model and processor
|
| 24 |
print("π Loading microsoft/git-base-coco model...")
|
| 25 |
+
processor = GitProcessor.from_pretrained("microsoft/git-base-coco/tree/main")
|
| 26 |
+
model = AutoModelForCausalLM.from_pretrained("microsoft/git-base-coco/tree/main", torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32)
|
| 27 |
print("β
Model loaded!")
|
| 28 |
|
| 29 |
@app.get("/")
|