Spaces:
Build error
Build error
kwabs22 commited on
Commit ·
cb5934e
1
Parent(s): 762532e
Prompt changes
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def generate_response(user_message): #Figure Out the parameters later and find a
|
|
| 22 |
for line in process.stdout:
|
| 23 |
alllines += " " + line
|
| 24 |
elapsed_time = time.time() - start_time # Calculate elapsed time
|
| 25 |
-
yield f"{alllines} [Inference time: {elapsed_time:.2f} seconds]"
|
| 26 |
|
| 27 |
# Wait for the subprocess to finish if it hasn't already
|
| 28 |
process.wait()
|
|
@@ -38,8 +38,8 @@ def custom_generate_response(cust_user_message):
|
|
| 38 |
yield from generate_response(cust_user_message)
|
| 39 |
|
| 40 |
CustomPrompts = [
|
| 41 |
-
"Class Diagram
|
| 42 |
-
"Pydot code
|
| 43 |
]
|
| 44 |
|
| 45 |
with gr.Blocks() as iface:
|
|
@@ -48,11 +48,11 @@ with gr.Blocks() as iface:
|
|
| 48 |
inputs=gr.Textbox(lines=2, placeholder="Type your message here..."),
|
| 49 |
outputs="text",
|
| 50 |
title="Stable LM 2 Zephyr (1.6b) LLama.cpp Interface Test",
|
| 51 |
-
description="No Message History for now - Enter your message and get a response.",
|
| 52 |
flagging_dir="/usr/src/app/flagged",
|
| 53 |
)
|
| 54 |
with gr.Group():
|
| 55 |
-
gr.HTML("Test for wrapping generator")
|
| 56 |
MainOutput = gr.TextArea(placeholder='Output will show here')
|
| 57 |
CustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
| 58 |
CustomButtonClassDiagram = gr.Button(CustomPrompts[0])
|
|
|
|
| 22 |
for line in process.stdout:
|
| 23 |
alllines += " " + line
|
| 24 |
elapsed_time = time.time() - start_time # Calculate elapsed time
|
| 25 |
+
yield f"{alllines} \n\n [Inference time: {elapsed_time:.2f} seconds]"
|
| 26 |
|
| 27 |
# Wait for the subprocess to finish if it hasn't already
|
| 28 |
process.wait()
|
|
|
|
| 38 |
yield from generate_response(cust_user_message)
|
| 39 |
|
| 40 |
CustomPrompts = [
|
| 41 |
+
"Write a Class Diagram based on the following text:",
|
| 42 |
+
"Write a Pydot code based on the following text:",
|
| 43 |
]
|
| 44 |
|
| 45 |
with gr.Blocks() as iface:
|
|
|
|
| 48 |
inputs=gr.Textbox(lines=2, placeholder="Type your message here..."),
|
| 49 |
outputs="text",
|
| 50 |
title="Stable LM 2 Zephyr (1.6b) LLama.cpp Interface Test",
|
| 51 |
+
description="No Message History for now - Enter your message and get a response. (One sentence every 20s)",
|
| 52 |
flagging_dir="/usr/src/app/flagged",
|
| 53 |
)
|
| 54 |
with gr.Group():
|
| 55 |
+
gr.HTML("Test for wrapping generator (20 seconds a piece of the response)")
|
| 56 |
MainOutput = gr.TextArea(placeholder='Output will show here')
|
| 57 |
CustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
| 58 |
CustomButtonClassDiagram = gr.Button(CustomPrompts[0])
|