Commit
·
9e319c7
1
Parent(s):
20f8796
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,6 +122,10 @@ Frage: Wann wurde Hugging Face gegründet?""",
|
|
| 122 |
"Schreibe eine Produktbeschreibung für einen LG 43UQ75009LF 109 cm (43 Zoll) UHD Fernseher (Active HDR, 60 Hz, Smart TV) [Modelljahr 2022]",
|
| 123 |
]
|
| 124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
with gr.Blocks(theme=theme) as demo:
|
| 127 |
with gr.Column():
|
|
@@ -147,9 +151,9 @@ with gr.Blocks(theme=theme) as demo:
|
|
| 147 |
gr.Examples(
|
| 148 |
examples=examples,
|
| 149 |
inputs=[instruction],
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
)
|
| 154 |
|
| 155 |
with gr.Column(scale=1):
|
|
|
|
| 122 |
"Schreibe eine Produktbeschreibung für einen LG 43UQ75009LF 109 cm (43 Zoll) UHD Fernseher (Active HDR, 60 Hz, Smart TV) [Modelljahr 2022]",
|
| 123 |
]
|
| 124 |
|
| 125 |
+
def process_example(args):
|
| 126 |
+
for x in generate(args):
|
| 127 |
+
pass
|
| 128 |
+
return x
|
| 129 |
|
| 130 |
with gr.Blocks(theme=theme) as demo:
|
| 131 |
with gr.Column():
|
|
|
|
| 151 |
gr.Examples(
|
| 152 |
examples=examples,
|
| 153 |
inputs=[instruction],
|
| 154 |
+
cache_examples=True,
|
| 155 |
+
fn=process_example,
|
| 156 |
+
outputs=[output],
|
| 157 |
)
|
| 158 |
|
| 159 |
with gr.Column(scale=1):
|