zerowastekitchen / test_modal.py
srilathatata's picture
feat: receipt OCR working - MiniCPM-V 4.6 parsing real receipts
4864b5a
Raw
History Blame Contribute Delete
475 Bytes
import modal
app = modal.App("test-zerowastekitchen")
image = modal.Image.debian_slim().pip_install("torch", "numpy")
@app.function(gpu="T4", image=image)
def hello():
import torch
result = f"GPU available: {torch.cuda.is_available()}"
if torch.cuda.is_available():
result += f", Device: {torch.cuda.get_device_name(0)}"
print(result)
return result
@app.local_entrypoint()
def main():
result = hello.remote()
print(f"Result: {result}")