Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,11 +40,11 @@ except Exception as e:
|
|
40 |
# Inferenz durchführen
|
41 |
try:
|
42 |
with torch.no_grad():
|
43 |
-
outputs = model.generate(
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
except Exception as e:
|
49 |
print(f"Fehler bei der Inferenz: {e}")
|
50 |
|
|
|
40 |
# Inferenz durchführen
|
41 |
try:
|
42 |
with torch.no_grad():
|
43 |
+
outputs = model.generate(
|
44 |
+
input_ids=inputs["input_ids"].to(device),
|
45 |
+
max_length=50 # Versuche mit einer kleineren Länge
|
46 |
+
)
|
47 |
+
print("Inferenz abgeschlossen.")
|
48 |
except Exception as e:
|
49 |
print(f"Fehler bei der Inferenz: {e}")
|
50 |
|