Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,20 +35,20 @@ with gr.Blocks(css="""
|
|
35 |
.message.svelte-w6rprc.svelte-w6rprc.svelte-w6rprc {font-size: 20px; margin-top: 20px}
|
36 |
#component-21 > div.wrap.svelte-w6rprc {height: 600px;}
|
37 |
""") as demo:
|
38 |
-
with gr.
|
39 |
-
with gr.
|
40 |
input_text = gr.Textbox(placeholder="Insert your prompt here:", scale=2, container=False)
|
41 |
answer = gr.Textbox(lines=0, label="Answer")
|
42 |
generate_bt = gr.Button("Generate", scale=1)
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
demo.queue()
|
54 |
demo.launch()
|
|
|
35 |
.message.svelte-w6rprc.svelte-w6rprc.svelte-w6rprc {font-size: 20px; margin-top: 20px}
|
36 |
#component-21 > div.wrap.svelte-w6rprc {height: 600px;}
|
37 |
""") as demo:
|
38 |
+
with gr.Row():
|
39 |
+
with gr.Column():
|
40 |
input_text = gr.Textbox(placeholder="Insert your prompt here:", scale=2, container=False)
|
41 |
answer = gr.Textbox(lines=0, label="Answer")
|
42 |
generate_bt = gr.Button("Generate", scale=1)
|
43 |
+
inputs = [input_text]
|
44 |
+
outputs = [answer]
|
45 |
+
generate_bt.click(
|
46 |
+
fn=inference, inputs=inputs, outputs=outputs, show_progress=True
|
47 |
+
)
|
48 |
+
examples = [
|
49 |
+
["My last two weather pics from the storm on August 2nd. People packed up real fast after the temp dropped and winds picked up.", 1],
|
50 |
+
["Lying Clinton sinking! Donald Trump singing: Let's Make America Great Again!", 0],
|
51 |
+
],
|
52 |
|
53 |
demo.queue()
|
54 |
demo.launch()
|