Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,6 @@ import gradio as gr
|
|
| 2 |
from groq import Groq
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
# ⚠️ IMPORTANT: Set your Groq API key in Hugging Face Spaces "Secrets"
|
| 6 |
-
# os.environ["GROQ_API_KEY"] = "your_api_key_here"
|
| 7 |
-
|
| 8 |
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
|
| 9 |
|
| 10 |
def analyze_prompt(user_prompt):
|
|
@@ -21,7 +18,6 @@ def analyze_prompt(user_prompt):
|
|
| 21 |
- Data Leakage Attempt
|
| 22 |
- Harmful or Offensive Request
|
| 23 |
- Hallucination Risk
|
| 24 |
-
- Safe / Low Risk
|
| 25 |
|
| 26 |
Only return a concise result in this exact format:
|
| 27 |
|
|
|
|
| 2 |
from groq import Groq
|
| 3 |
import os
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
|
| 6 |
|
| 7 |
def analyze_prompt(user_prompt):
|
|
|
|
| 18 |
- Data Leakage Attempt
|
| 19 |
- Harmful or Offensive Request
|
| 20 |
- Hallucination Risk
|
|
|
|
| 21 |
|
| 22 |
Only return a concise result in this exact format:
|
| 23 |
|