Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,19 +16,20 @@ os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
|
16 |
# --- Configuration ---
|
17 |
class ChatConfig:
|
18 |
MODEL = "google/gemma-3-27b-it:free"
|
19 |
-
DEFAULT_MAX_TOKENS =
|
20 |
DEFAULT_TEMP = 0.5 # Slightly increased for more natural variance
|
21 |
DEFAULT_TOP_P = 0.95
|
22 |
|
23 |
# --- NEW: System Prompt Options ---
|
24 |
# Option 1: Friendly & Helpful Assistant
|
25 |
-
SYSTEM_PROMPT_FRIENDLY = """You are
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
32 |
|
33 |
|
34 |
|
|
|
16 |
# --- Configuration ---
|
17 |
class ChatConfig:
|
18 |
MODEL = "google/gemma-3-27b-it:free"
|
19 |
+
DEFAULT_MAX_TOKENS = 300
|
20 |
DEFAULT_TEMP = 0.5 # Slightly increased for more natural variance
|
21 |
DEFAULT_TOP_P = 0.95
|
22 |
|
23 |
# --- NEW: System Prompt Options ---
|
24 |
# Option 1: Friendly & Helpful Assistant
|
25 |
+
SYSTEM_PROMPT_FRIENDLY = """You are a knowledgeable AI expert specializing in the content of the uploaded PDF document.
|
26 |
+
You must answer user questions with precision, drawing *exclusively* from the provided context segments.
|
27 |
+
Maintain a professional and informative tone.
|
28 |
+
If the provided context does not contain the necessary information to answer the question, explicitly state that the information is not found within the scope of the provided text.
|
29 |
+
Do not speculate, infer beyond the text, or utilize any external information sources.
|
30 |
+
Clearly attribute your answers to the document, for instance, by starting with "The document indicates that..." or "Based on the provided context...".
|
31 |
+
Provide comprehensive answers derived solely from the text.
|
32 |
+
"""
|
33 |
|
34 |
|
35 |
|