Spaces:
Sleeping
Sleeping
Fix role issue on Mistral model
Browse files
app.py
CHANGED
|
@@ -17,6 +17,7 @@ AVAILABLE_MODELS = {
|
|
| 17 |
# --- Prompt Template ---
|
| 18 |
|
| 19 |
PROMPT_TEMPLATE = """
|
|
|
|
| 20 |
Using **only** the license text provided below, create a concise Markdown
|
| 21 |
summary that complies with *all* the rules in this prompt.
|
| 22 |
|
|
@@ -81,7 +82,7 @@ def analyze_license(model_display_name, license_text):
|
|
| 81 |
final_prompt = PROMPT_TEMPLATE.format(license_text=license_text)
|
| 82 |
|
| 83 |
# Messages to the model in the chat
|
| 84 |
-
messages = [{"role": "
|
| 85 |
|
| 86 |
try:
|
| 87 |
# API call
|
|
|
|
| 17 |
# --- Prompt Template ---
|
| 18 |
|
| 19 |
PROMPT_TEMPLATE = """
|
| 20 |
+
You are an expert on open-source software compliance and licensing.
|
| 21 |
Using **only** the license text provided below, create a concise Markdown
|
| 22 |
summary that complies with *all* the rules in this prompt.
|
| 23 |
|
|
|
|
| 82 |
final_prompt = PROMPT_TEMPLATE.format(license_text=license_text)
|
| 83 |
|
| 84 |
# Messages to the model in the chat
|
| 85 |
+
messages = [{"role": "user", "content": final_prompt}]
|
| 86 |
|
| 87 |
try:
|
| 88 |
# API call
|