Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ def format_prompt(message, job_profession):
|
|
| 8 |
prompt = f"<s>[SYS] {system_prompt} [/SYS][INST] {message} [/INST]</s>"
|
| 9 |
return prompt
|
| 10 |
|
| 11 |
-
def generate(message, job_profession, temperature=0.9, max_new_tokens=
|
| 12 |
# Parse the input to determine job profession based on the presence of a message.
|
| 13 |
actual_job = message if message else job_profession
|
| 14 |
|
|
@@ -42,7 +42,7 @@ css = """
|
|
| 42 |
}
|
| 43 |
"""
|
| 44 |
|
| 45 |
-
with gr.Blocks(css=css) as
|
| 46 |
with gr.Row():
|
| 47 |
with gr.Column(scale=2):
|
| 48 |
gr.HTML("<h1>Settings</h1>")
|
|
@@ -62,4 +62,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 62 |
outputs=output_area
|
| 63 |
)
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
prompt = f"<s>[SYS] {system_prompt} [/SYS][INST] {message} [/INST]</s>"
|
| 9 |
return prompt
|
| 10 |
|
| 11 |
+
def generate(message, job_profession, temperature=0.9, max_new_tokens=4192, top_p=0.95, repetition_penalty=1.0):
|
| 12 |
# Parse the input to determine job profession based on the presence of a message.
|
| 13 |
actual_job = message if message else job_profession
|
| 14 |
|
|
|
|
| 42 |
}
|
| 43 |
"""
|
| 44 |
|
| 45 |
+
with gr.Blocks(css=css) as gpt:
|
| 46 |
with gr.Row():
|
| 47 |
with gr.Column(scale=2):
|
| 48 |
gr.HTML("<h1>Settings</h1>")
|
|
|
|
| 62 |
outputs=output_area
|
| 63 |
)
|
| 64 |
|
| 65 |
+
gr.Markdown("""
|
| 66 |
+
---
|
| 67 |
+
### Meta Information
|
| 68 |
+
**Project Title**: GPT Prompt Generator
|
| 69 |
+
**Github**: [https://github.com/pacnimo/gpt-prompt-generator](https://github.com/pacnimo/gpt-prompt-generator)
|
| 70 |
+
**Description**: GPT Prompt Generator is Free and Easy to Use. Create a GPT Prompt Based on the Profession. 1 Click Prompt Generator.
|
| 71 |
+
**Footer**: © 2024 by [GitHub](https://github.com/pacnimo/). All rights reserved.
|
| 72 |
+
""") # Meta, project description, and footer added here
|
| 73 |
+
|
| 74 |
+
gpt.launch(debug=True)
|