Upload 4 files
Browse files- app.py +3 -4
- config.json +2 -2
app.py
CHANGED
@@ -53,7 +53,7 @@ Engagement Style:
|
|
53 |
|
54 |
Remember: Your goal is to support student learning and success while maintaining the pedagogical integrity of the course. You are a learning facilitator, not an answer provider."""
|
55 |
MODEL = "google/gemini-2.0-flash-001"
|
56 |
-
GROUNDING_URLS = ["https://zmuhls.github.io/ccny-data-science/schedule/", "https://zmuhls.github.io/ccny-data-science/syllabus/", "https://zmuhls.github.io/ccny-data-science/portfolio/", "https://zmuhls.github.io/ccny-data-science/activities/"
|
57 |
# Get access code from environment variable for security
|
58 |
# If SPACE_ACCESS_CODE is not set, no access control is applied
|
59 |
ACCESS_CODE = os.environ.get("SPACE_ACCESS_CODE")
|
@@ -537,8 +537,7 @@ def get_configuration_status():
|
|
537 |
status_parts.append("**System Prompt:**")
|
538 |
status_parts.append(f"{SYSTEM_PROMPT}")
|
539 |
|
540 |
-
return "
|
541 |
-
".join(status_parts)
|
542 |
|
543 |
# Create interface with access code protection
|
544 |
with gr.Blocks(title=SPACE_NAME) as demo:
|
@@ -568,7 +567,7 @@ with gr.Blocks(title=SPACE_NAME) as demo:
|
|
568 |
fn=store_and_generate_response, # Use wrapper function to store history
|
569 |
title="", # Title already shown above
|
570 |
description="", # Description already shown above
|
571 |
-
examples=['When is the social coding portfolio due?', 'How can I reach Prof. Muhlbauer?', 'Explain Python data types to me'],
|
572 |
type="messages" # Use modern message format for better compatibility
|
573 |
)
|
574 |
|
|
|
53 |
|
54 |
Remember: Your goal is to support student learning and success while maintaining the pedagogical integrity of the course. You are a learning facilitator, not an answer provider."""
|
55 |
MODEL = "google/gemini-2.0-flash-001"
|
56 |
+
GROUNDING_URLS = ["https://zmuhls.github.io/ccny-data-science/schedule/", "https://zmuhls.github.io/ccny-data-science/syllabus/", "https://zmuhls.github.io/ccny-data-science/portfolio/", "https://zmuhls.github.io/ccny-data-science/activities/"]
|
57 |
# Get access code from environment variable for security
|
58 |
# If SPACE_ACCESS_CODE is not set, no access control is applied
|
59 |
ACCESS_CODE = os.environ.get("SPACE_ACCESS_CODE")
|
|
|
537 |
status_parts.append("**System Prompt:**")
|
538 |
status_parts.append(f"{SYSTEM_PROMPT}")
|
539 |
|
540 |
+
return "\n".join(status_parts)
|
|
|
541 |
|
542 |
# Create interface with access code protection
|
543 |
with gr.Blocks(title=SPACE_NAME) as demo:
|
|
|
567 |
fn=store_and_generate_response, # Use wrapper function to store history
|
568 |
title="", # Title already shown above
|
569 |
description="", # Description already shown above
|
570 |
+
examples=['When is the social coding portfolio due?', 'How can I reach Prof. Muhlbauer?', 'Explain Python data types to me', 'What kind of programming language is Python?'],
|
571 |
type="messages" # Use modern message format for better compatibility
|
572 |
)
|
573 |
|
config.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
"api_key_var": "OPENROUTER_API_KEY",
|
7 |
"temperature": 0.7,
|
8 |
"max_tokens": 750,
|
9 |
-
"examples": "['When is the social coding portfolio due?', 'How can I reach Prof. Muhlbauer?', 'Explain Python data types to me']",
|
10 |
-
"grounding_urls": "[\"https://zmuhls.github.io/ccny-data-science/schedule/\", \"https://zmuhls.github.io/ccny-data-science/syllabus/\", \"https://zmuhls.github.io/ccny-data-science/portfolio/\", \"https://zmuhls.github.io/ccny-data-science/activities/\"
|
11 |
"enable_dynamic_urls": true
|
12 |
}
|
|
|
6 |
"api_key_var": "OPENROUTER_API_KEY",
|
7 |
"temperature": 0.7,
|
8 |
"max_tokens": 750,
|
9 |
+
"examples": "['When is the social coding portfolio due?', 'How can I reach Prof. Muhlbauer?', 'Explain Python data types to me', 'What kind of programming language is Python?']",
|
10 |
+
"grounding_urls": "[\"https://zmuhls.github.io/ccny-data-science/schedule/\", \"https://zmuhls.github.io/ccny-data-science/syllabus/\", \"https://zmuhls.github.io/ccny-data-science/portfolio/\", \"https://zmuhls.github.io/ccny-data-science/activities/\"]",
|
11 |
"enable_dynamic_urls": true
|
12 |
}
|