Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -324,7 +324,7 @@ def _genera_con_validazione(
|
|
| 324 |
# Endpoint
|
| 325 |
# ---------------------------------------------------------------------------
|
| 326 |
|
| 327 |
-
@gpu(duration=
|
| 328 |
def genera(
|
| 329 |
system_instruction: str,
|
| 330 |
user_text: str,
|
|
@@ -340,7 +340,7 @@ def genera(
|
|
| 340 |
)
|
| 341 |
|
| 342 |
|
| 343 |
-
@gpu(duration=
|
| 344 |
def analizza_foto(immagine: Optional[Image.Image], contesto: str) -> str:
|
| 345 |
if immagine is None:
|
| 346 |
raise gr.Error("Carica una foto del frigo, della dispensa o dello scontrino.")
|
|
@@ -366,7 +366,7 @@ def analizza_foto(immagine: Optional[Image.Image], contesto: str) -> str:
|
|
| 366 |
)
|
| 367 |
|
| 368 |
|
| 369 |
-
@gpu(duration=
|
| 370 |
def piano(contesto: str) -> str:
|
| 371 |
sistema = (
|
| 372 |
"Sei il coach della dispensa di casa.\n"
|
|
@@ -390,7 +390,7 @@ def piano(contesto: str) -> str:
|
|
| 390 |
)
|
| 391 |
|
| 392 |
|
| 393 |
-
@gpu(duration=
|
| 394 |
def comando(contesto: str, messaggio: str) -> str:
|
| 395 |
sistema = (
|
| 396 |
"Sei l'assistente della dispensa di casa.\n"
|
|
@@ -409,7 +409,7 @@ def comando(contesto: str, messaggio: str) -> str:
|
|
| 409 |
)
|
| 410 |
|
| 411 |
|
| 412 |
-
@gpu(duration=
|
| 413 |
def chat(contesto: str, domanda: str) -> str:
|
| 414 |
sistema = (
|
| 415 |
"Sei il coach della dispensa di casa.\n"
|
|
|
|
| 324 |
# Endpoint
|
| 325 |
# ---------------------------------------------------------------------------
|
| 326 |
|
| 327 |
+
@gpu(duration=60)
|
| 328 |
def genera(
|
| 329 |
system_instruction: str,
|
| 330 |
user_text: str,
|
|
|
|
| 340 |
)
|
| 341 |
|
| 342 |
|
| 343 |
+
@gpu(duration=60)
|
| 344 |
def analizza_foto(immagine: Optional[Image.Image], contesto: str) -> str:
|
| 345 |
if immagine is None:
|
| 346 |
raise gr.Error("Carica una foto del frigo, della dispensa o dello scontrino.")
|
|
|
|
| 366 |
)
|
| 367 |
|
| 368 |
|
| 369 |
+
@gpu(duration=60)
|
| 370 |
def piano(contesto: str) -> str:
|
| 371 |
sistema = (
|
| 372 |
"Sei il coach della dispensa di casa.\n"
|
|
|
|
| 390 |
)
|
| 391 |
|
| 392 |
|
| 393 |
+
@gpu(duration=60)
|
| 394 |
def comando(contesto: str, messaggio: str) -> str:
|
| 395 |
sistema = (
|
| 396 |
"Sei l'assistente della dispensa di casa.\n"
|
|
|
|
| 409 |
)
|
| 410 |
|
| 411 |
|
| 412 |
+
@gpu(duration=60)
|
| 413 |
def chat(contesto: str, domanda: str) -> str:
|
| 414 |
sistema = (
|
| 415 |
"Sei il coach della dispensa di casa.\n"
|