Spaces:
Runtime error
Runtime error
Commit
·
9f60332
1
Parent(s):
50144cf
unsl
Browse files
app.py
CHANGED
|
@@ -30,6 +30,8 @@ def translate(
|
|
| 30 |
direction,
|
| 31 |
max_tokens=128
|
| 32 |
):
|
|
|
|
|
|
|
| 33 |
# Richtung bestimmen und Anweisung formatieren
|
| 34 |
if direction == "hochdeutsch_to_schwaebisch":
|
| 35 |
instruction = "Übersetze den hochdeutschen Text ins Schwäbische. Achte auf eine sinnvolle und korrekte Satzbildung!"
|
|
|
|
| 30 |
direction,
|
| 31 |
max_tokens=128
|
| 32 |
):
|
| 33 |
+
FastLanguageModel.for_inference(model)
|
| 34 |
+
|
| 35 |
# Richtung bestimmen und Anweisung formatieren
|
| 36 |
if direction == "hochdeutsch_to_schwaebisch":
|
| 37 |
instruction = "Übersetze den hochdeutschen Text ins Schwäbische. Achte auf eine sinnvolle und korrekte Satzbildung!"
|