Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import requests
|
|
| 3 |
import os
|
| 4 |
|
| 5 |
# Set page title and layout
|
| 6 |
-
st.set_page_config(page_title="
|
| 7 |
|
| 8 |
# API key from environment variable
|
| 9 |
API_KEY = os.environ.get("NEBIUS_API_KEY")
|
|
@@ -16,7 +16,7 @@ def generate_response(prompt, api_key):
|
|
| 16 |
api_url = "https://api.studio.nebius.ai/v1/chat/completions"
|
| 17 |
headers = {"Authorization": f"Bearer {api_key}"}
|
| 18 |
payload = {
|
| 19 |
-
"model": "
|
| 20 |
"messages": [
|
| 21 |
{"role": "system", "content": """You are a Prompt Generator designed to create task-specific prompts for various user requests. Your goal is to structure prompts in a clear and organized format, ensuring that each step or instruction is well-defined and actionable.
|
| 22 |
|
|
@@ -34,11 +34,11 @@ Steps:
|
|
| 34 |
|
| 35 |
[List the steps or instructions required to complete the task]
|
| 36 |
|
| 37 |
-
Considerations
|
| 38 |
|
| 39 |
[Include any additional factors the user should consider, such as limitations, preferences, or specific conditions]
|
| 40 |
|
| 41 |
-
Output Format
|
| 42 |
|
| 43 |
[Describe the desired output format, whether it's a report, image, text, or other deliverables]
|
| 44 |
|
|
@@ -49,6 +49,7 @@ Structure the task prompt clearly with numbered steps or bullet points for easy
|
|
| 49 |
Tailor the language and level of complexity based on the user’s input or desired difficulty level.
|
| 50 |
|
| 51 |
Ensure the prompt is actionable, providing clear instructions that lead to the intended outcome. Don't write anything right now wait for my command. """},
|
|
|
|
| 52 |
{"role": "user", "content": prompt}
|
| 53 |
],
|
| 54 |
"temperature": 0.6,
|
|
|
|
| 3 |
import os
|
| 4 |
|
| 5 |
# Set page title and layout
|
| 6 |
+
st.set_page_config(page_title="Super Prompt Generator", layout="wide")
|
| 7 |
|
| 8 |
# API key from environment variable
|
| 9 |
API_KEY = os.environ.get("NEBIUS_API_KEY")
|
|
|
|
| 16 |
api_url = "https://api.studio.nebius.ai/v1/chat/completions"
|
| 17 |
headers = {"Authorization": f"Bearer {api_key}"}
|
| 18 |
payload = {
|
| 19 |
+
"model": "microsoft/Phi-3.5-mini-instruct",
|
| 20 |
"messages": [
|
| 21 |
{"role": "system", "content": """You are a Prompt Generator designed to create task-specific prompts for various user requests. Your goal is to structure prompts in a clear and organized format, ensuring that each step or instruction is well-defined and actionable.
|
| 22 |
|
|
|
|
| 34 |
|
| 35 |
[List the steps or instructions required to complete the task]
|
| 36 |
|
| 37 |
+
Considerations:
|
| 38 |
|
| 39 |
[Include any additional factors the user should consider, such as limitations, preferences, or specific conditions]
|
| 40 |
|
| 41 |
+
Output Format:
|
| 42 |
|
| 43 |
[Describe the desired output format, whether it's a report, image, text, or other deliverables]
|
| 44 |
|
|
|
|
| 49 |
Tailor the language and level of complexity based on the user’s input or desired difficulty level.
|
| 50 |
|
| 51 |
Ensure the prompt is actionable, providing clear instructions that lead to the intended outcome. Don't write anything right now wait for my command. """},
|
| 52 |
+
|
| 53 |
{"role": "user", "content": prompt}
|
| 54 |
],
|
| 55 |
"temperature": 0.6,
|