Artem commited on
Commit ·
0b79131
1
Parent(s): 2323b4d
added a print statement lol
Browse files- eval.py +0 -4
- local_model.py +2 -1
- remote_model.py +1 -0
eval.py
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import time
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local_model.py
CHANGED
|
@@ -12,7 +12,8 @@ processor = AutoProcessor.from_pretrained(BASE_MODEL)
|
|
| 12 |
|
| 13 |
def query_local(image: Image.Image, question: str):
|
| 14 |
start_time = time.time()
|
| 15 |
-
|
|
|
|
| 16 |
raise ValueError("Missing image")
|
| 17 |
|
| 18 |
messages = [
|
|
|
|
| 12 |
|
| 13 |
def query_local(image: Image.Image, question: str):
|
| 14 |
start_time = time.time()
|
| 15 |
+
print("starting local inference at: %s" %( start_time))
|
| 16 |
+
if not image:
|
| 17 |
raise ValueError("Missing image")
|
| 18 |
|
| 19 |
messages = [
|
remote_model.py
CHANGED
|
@@ -11,6 +11,7 @@ pipe = pipeline("image-text-to-text", model = BASE_MODEL)
|
|
| 11 |
|
| 12 |
def query_remote(image: Image.Image, question: str, pipe):
|
| 13 |
start_time = time.time()
|
|
|
|
| 14 |
if not Image:
|
| 15 |
raise ValueError("Missing image")
|
| 16 |
|
|
|
|
| 11 |
|
| 12 |
def query_remote(image: Image.Image, question: str, pipe):
|
| 13 |
start_time = time.time()
|
| 14 |
+
print("starting remote inference... %s" %(start_time))
|
| 15 |
if not Image:
|
| 16 |
raise ValueError("Missing image")
|
| 17 |
|