Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,10 +52,11 @@ def compute_embeddings(selected_task, input_text, system_prompt):
|
|
| 52 |
max_length = 2042 # Define max_length here
|
| 53 |
|
| 54 |
if selected_task == "None":
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
else:
|
| 58 |
-
# Use the task description from the tasks dictionary
|
| 59 |
task_description = tasks[selected_task]
|
| 60 |
processed_texts = [f'Instruct: {task_description}\nQuery: {input_text}']
|
| 61 |
|
|
|
|
| 52 |
max_length = 2042 # Define max_length here
|
| 53 |
|
| 54 |
if selected_task == "None":
|
| 55 |
+
if system_prompt:
|
| 56 |
+
processed_texts = [f'Instruct: {system_prompt}\nQuery: {input_text}']
|
| 57 |
+
else:
|
| 58 |
+
processed_texts = [f'Query: {input_text}']
|
| 59 |
else:
|
|
|
|
| 60 |
task_description = tasks[selected_task]
|
| 61 |
processed_texts = [f'Instruct: {task_description}\nQuery: {input_text}']
|
| 62 |
|