added pil_image to pipeline
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def krypton(input_image):
|
|
77 |
# image = Image.open(requests.get(url, stream=True).raw)
|
78 |
prompt = ("<|start_header_id|>user<|end_header_id|>\n\n<image>\nWhat are these?<|eot_id|>"
|
79 |
"<|start_header_id|>assistant<|end_header_id|>\n\n")
|
80 |
-
outputs = pipe(
|
81 |
nvidia_result = subprocess.run(['nvidia-smi'], stdout=subprocess.PIPE)
|
82 |
return outputs[0]
|
83 |
|
|
|
77 |
# image = Image.open(requests.get(url, stream=True).raw)
|
78 |
prompt = ("<|start_header_id|>user<|end_header_id|>\n\n<image>\nWhat are these?<|eot_id|>"
|
79 |
"<|start_header_id|>assistant<|end_header_id|>\n\n")
|
80 |
+
outputs = pipe(pil_image, prompt=prompt, generate_kwargs={"max_new_tokens": 200})
|
81 |
nvidia_result = subprocess.run(['nvidia-smi'], stdout=subprocess.PIPE)
|
82 |
return outputs[0]
|
83 |
|