Spaces:
Sleeping
Sleeping
Download app.py from Bauerfilho/forja-zero: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/spaces/Bauerfilho/forja-zero/resolve/main/app.py
- Command line
-
hf download hf://spaces/Bauerfilho/forja-zero/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Bauerfilho/forja-zero/resolve/main/app.py
695 Bytes
| import spaces | |
| import gradio as gr | |
| def forja(tarefa: str) -> str: | |
| import torch | |
| if not torch.cuda.is_available(): | |
| return "ERRO: GPU nao alocada" | |
| nome = torch.cuda.get_device_name(0) | |
| x = torch.rand(2000, 2000, device="cuda") @ torch.rand(2000, 2000, device="cuda") | |
| return f"forja-zero VIVA | GPU: {nome} | prova-de-trabalho: {float(x.sum()):.1f} | tarefa: {tarefa}" | |
| gr.Interface(fn=forja, inputs=gr.Textbox(label="tarefa"), outputs=gr.Textbox(label="prova"), | |
| title="🔥 Forja Zero — GPU da casa Bauer", | |
| description="Atuador GPU-bound da skill offload-hf. Colhe a cota ZeroGPU diária da assinatura PRO.").launch() | |