Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,8 @@ import os
|
|
| 4 |
|
| 5 |
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
|
| 6 |
|
| 7 |
-
SYSTEM_PROMPT = """You are
|
| 8 |
-
|
| 9 |
|
| 10 |
def respond(message, history, model, temperature, max_tokens):
|
| 11 |
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
|
|
@@ -31,8 +31,8 @@ def respond(message, history, model, temperature, max_tokens):
|
|
| 31 |
# ChatInterface with additional inputs for parameters
|
| 32 |
demo = gr.ChatInterface(
|
| 33 |
fn=respond,
|
| 34 |
-
title="
|
| 35 |
-
description="
|
| 36 |
additional_inputs=[
|
| 37 |
gr.Dropdown(
|
| 38 |
choices=[
|
|
@@ -61,9 +61,10 @@ demo = gr.ChatInterface(
|
|
| 61 |
),
|
| 62 |
],
|
| 63 |
examples=[
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
| 67 |
],
|
| 68 |
theme="soft",
|
| 69 |
)
|
|
|
|
| 4 |
|
| 5 |
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
|
| 6 |
|
| 7 |
+
SYSTEM_PROMPT = """You are a cybersecurity expert and SOC analyst. Provide structured and clear advice on detecting,
|
| 8 |
+
analyzing, and mitigating security threats, incidents, and vulnerabilities."""
|
| 9 |
|
| 10 |
def respond(message, history, model, temperature, max_tokens):
|
| 11 |
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
|
|
|
|
| 31 |
# ChatInterface with additional inputs for parameters
|
| 32 |
demo = gr.ChatInterface(
|
| 33 |
fn=respond,
|
| 34 |
+
title="SOC Assistant AI",
|
| 35 |
+
description="Get expert guidance on security monitoring, threat analysis, and incident response!",
|
| 36 |
additional_inputs=[
|
| 37 |
gr.Dropdown(
|
| 38 |
choices=[
|
|
|
|
| 61 |
),
|
| 62 |
],
|
| 63 |
examples=[
|
| 64 |
+
mples=[
|
| 65 |
+
["Create a storyboard for a 30-second coffee commercial"],
|
| 66 |
+
["Generate a horror movie opening scene storyboard"],
|
| 67 |
+
["Design a storyboard for a romantic comedy meet-cute at a bookstore"],,
|
| 68 |
],
|
| 69 |
theme="soft",
|
| 70 |
)
|