Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,15 @@ client = InferenceClient(
|
|
6 |
)
|
7 |
|
8 |
|
9 |
-
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
17 |
return prompt
|
18 |
|
19 |
|
|
|
6 |
)
|
7 |
|
8 |
|
9 |
+
# Geheime Eingabeaufforderung aus Umgebungsvariablen
|
10 |
+
secret_prompt = os.getenv("SECRET_PROMPT")
|
11 |
|
12 |
+
def format_prompt(new_message, history):
|
13 |
+
prompt = secret_prompt
|
14 |
+
for user_msg, bot_msg in history:
|
15 |
+
prompt += f"[INST] {user_msg} [/INST]"
|
16 |
+
prompt += f" {bot_msg}</s> "
|
17 |
+
prompt += f"[INST] {new_message} [/INST]"
|
18 |
return prompt
|
19 |
|
20 |
|