Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ class LLaVAPhiModel:
|
|
20 |
self.tokenizer.pad_token = self.tokenizer.eos_token
|
21 |
|
22 |
# Initialize processor (can be done outside GPU context)
|
23 |
-
self.processor = AutoProcessor.from_pretrained("
|
24 |
|
25 |
# Store conversation history
|
26 |
self.history = []
|
@@ -53,7 +53,7 @@ class LLaVAPhiModel:
|
|
53 |
|
54 |
if self.clip is None:
|
55 |
# Load CLIP model
|
56 |
-
self.clip = AutoModel.from_pretrained("
|
57 |
|
58 |
@spaces.GPU
|
59 |
def process_image(self, image):
|
|
|
20 |
self.tokenizer.pad_token = self.tokenizer.eos_token
|
21 |
|
22 |
# Initialize processor (can be done outside GPU context)
|
23 |
+
self.processor = AutoProcessor.from_pretrained("microsoft/clip-vit-base-patch32")
|
24 |
|
25 |
# Store conversation history
|
26 |
self.history = []
|
|
|
53 |
|
54 |
if self.clip is None:
|
55 |
# Load CLIP model
|
56 |
+
self.clip = AutoModel.from_pretrained("microsoft/clip-vit-base-patch32").to(self.device)
|
57 |
|
58 |
@spaces.GPU
|
59 |
def process_image(self, image):
|