Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,12 +7,10 @@ def get_output(prompt):
|
|
7 |
response = client.text_generation(prompt, max_new_tokens=512, temperature=0.7, top_p=0.95)
|
8 |
return response[0]['generated_text']
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
description="Click the button to get the output"
|
16 |
-
)
|
17 |
|
18 |
demo.launch()
|
|
|
7 |
response = client.text_generation(prompt, max_new_tokens=512, temperature=0.7, top_p=0.95)
|
8 |
return response[0]['generated_text']
|
9 |
|
10 |
+
with gr.Blocks() as demo:
|
11 |
+
prompt = gr.Textbox(label="Enter your prompt")
|
12 |
+
button = gr.Button("Generate Output")
|
13 |
+
output = gr.Textbox(label="Output")
|
14 |
+
button.click(get_output, inputs=prompt, outputs=output)
|
|
|
|
|
15 |
|
16 |
demo.launch()
|