Spaces:
Build error
Build error
kwabs22 commited on
Commit ·
35fa9a6
1
Parent(s): 079e3f7
Some prompt additions
Browse files
app.py
CHANGED
|
@@ -118,6 +118,16 @@ BusinessPrompts = [
|
|
| 118 |
("Explain how this to make this product unique from competitors:", "Considerations:"),
|
| 119 |
]
|
| 120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
with gr.Blocks() as iface:
|
| 122 |
gr.HTML("<a href='https://huggingface.co/spaces/stabilityai/stablelm-2-1_6b-zephyr'> -- Original StabilityAI demo -- </a> | ")
|
| 123 |
gr.Interface(
|
|
@@ -130,9 +140,8 @@ with gr.Blocks() as iface:
|
|
| 130 |
)
|
| 131 |
|
| 132 |
gr.HTML("Any standard way of thinking / Repetitive idea / rule of thumb / advice can be turned into a button (In a timeline?)")
|
|
|
|
| 133 |
|
| 134 |
-
|
| 135 |
-
gr.HTML("Test for wrapping generator (Instead of buttons tabs and dropdowns?)")
|
| 136 |
MainOutput = gr.TextArea(placeholder='Output will show here')
|
| 137 |
CustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
| 138 |
|
|
@@ -143,11 +152,18 @@ with gr.Blocks() as iface:
|
|
| 143 |
# Pass CustomPrompts list as an argument
|
| 144 |
button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(CustomPrompts)], outputs=MainOutput)
|
| 145 |
|
| 146 |
-
with gr.Accordion("General Product based", open=False):
|
| 147 |
with gr.Group():
|
| 148 |
for index, (prompt, _) in enumerate(BusinessPrompts):
|
| 149 |
button = gr.Button(prompt)
|
| 150 |
# Pass BusinessPrompts list as an argument
|
| 151 |
button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(BusinessPrompts)], outputs=MainOutput)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
iface.queue().launch(server_name="0.0.0.0", share=True)
|
|
|
|
| 118 |
("Explain how this to make this product unique from competitors:", "Considerations:"),
|
| 119 |
]
|
| 120 |
|
| 121 |
+
ProgrammingPatternPrompts = [
|
| 122 |
+
("Demonstrate a builder pattern in go:", ""),
|
| 123 |
+
("Demonstrate a zero cost abstractions in go:", ""),
|
| 124 |
+
("Demonstrate a builder pattern in rust:", ""),
|
| 125 |
+
("Demonstrate a Polymorphism in rust:", ""),
|
| 126 |
+
("Explain how RAII pattern affects rust:", ""),
|
| 127 |
+
("Demonstrate a builder pattern in c++:", ""),
|
| 128 |
+
("Explain when to consider using a builder pattern in go:", ""),
|
| 129 |
+
]
|
| 130 |
+
|
| 131 |
with gr.Blocks() as iface:
|
| 132 |
gr.HTML("<a href='https://huggingface.co/spaces/stabilityai/stablelm-2-1_6b-zephyr'> -- Original StabilityAI demo -- </a> | ")
|
| 133 |
gr.Interface(
|
|
|
|
| 140 |
)
|
| 141 |
|
| 142 |
gr.HTML("Any standard way of thinking / Repetitive idea / rule of thumb / advice can be turned into a button (In a timeline?)")
|
| 143 |
+
gr.HTML("LLM powered Buttons as the new notetaking? (Youtube Video to prompt pipeline?)<br><br>List to buttons (Instead of buttons tabs and dropdowns?)")
|
| 144 |
|
|
|
|
|
|
|
| 145 |
MainOutput = gr.TextArea(placeholder='Output will show here')
|
| 146 |
CustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
| 147 |
|
|
|
|
| 152 |
# Pass CustomPrompts list as an argument
|
| 153 |
button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(CustomPrompts)], outputs=MainOutput)
|
| 154 |
|
| 155 |
+
with gr.Accordion("General Product and Business based", open=False):
|
| 156 |
with gr.Group():
|
| 157 |
for index, (prompt, _) in enumerate(BusinessPrompts):
|
| 158 |
button = gr.Button(prompt)
|
| 159 |
# Pass BusinessPrompts list as an argument
|
| 160 |
button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(BusinessPrompts)], outputs=MainOutput)
|
| 161 |
+
|
| 162 |
+
with gr.Accordion("General Programming Pattern based", open=False):
|
| 163 |
+
with gr.Group():
|
| 164 |
+
for index, (prompt, _) in enumerate(ProgrammingPatternPrompts):
|
| 165 |
+
button = gr.Button(prompt)
|
| 166 |
+
# Pass BusinessPrompts list as an argument
|
| 167 |
+
button.click(custom_generate_response, inputs=[CustomButtonInput, gr.State(index), gr.State(ProgrammingPatternPrompts)], outputs=MainOutput)
|
| 168 |
|
| 169 |
iface.queue().launch(server_name="0.0.0.0", share=True)
|