Update app.py
Browse files
app.py
CHANGED
|
@@ -30,14 +30,10 @@ def translate_text(text, lang=None, progress=gr.Progress(track_tqdm=True)):
|
|
| 30 |
# Set default values if None (happens during example caching)
|
| 31 |
if lang is None:
|
| 32 |
return text
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
if temperature is None:
|
| 38 |
-
temperature = 0.7
|
| 39 |
-
if top_p is None:
|
| 40 |
-
top_p = 0.95
|
| 41 |
|
| 42 |
# Build conversation history
|
| 43 |
messages = []
|
|
|
|
| 30 |
# Set default values if None (happens during example caching)
|
| 31 |
if lang is None:
|
| 32 |
return text
|
| 33 |
+
system_message = "You are a helpful AI assistant."
|
| 34 |
+
max_tokens = 5120
|
| 35 |
+
temperature = 0.7
|
| 36 |
+
top_p = 0.95
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
# Build conversation history
|
| 39 |
messages = []
|