Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,12 @@ def generate_output(prompt,maxtokens=20):
|
|
21 |
toc = time.time()
|
22 |
raw_data = data.decode("utf-8")
|
23 |
json_data = json.loads(raw_data)
|
24 |
-
return json_data["prediction"], round(toc-tic,3)
|
25 |
|
26 |
input_text = gr.inputs.Textbox(label="Enter Prompt")
|
27 |
slider = gr.inputs.Slider(minimum=1, maximum=75, step=1, default=20, label="Max New Tokens")
|
28 |
output_text = gr.outputs.Textbox(label="Response")
|
29 |
-
time_text = gr.outputs.Label(label="Time Taken
|
30 |
|
31 |
title = "SPR - Cnvrg.io | Serving"
|
32 |
description = "Interact with the endpoint - Falcon 7B (Instruct)"
|
|
|
21 |
toc = time.time()
|
22 |
raw_data = data.decode("utf-8")
|
23 |
json_data = json.loads(raw_data)
|
24 |
+
return json_data["prediction"], str(round(toc-tic,3))+"s"
|
25 |
|
26 |
input_text = gr.inputs.Textbox(label="Enter Prompt")
|
27 |
slider = gr.inputs.Slider(minimum=1, maximum=75, step=1, default=20, label="Max New Tokens")
|
28 |
output_text = gr.outputs.Textbox(label="Response")
|
29 |
+
time_text = gr.outputs.Label(label="Time Taken")
|
30 |
|
31 |
title = "SPR - Cnvrg.io | Serving"
|
32 |
description = "Interact with the endpoint - Falcon 7B (Instruct)"
|