Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -113,15 +113,18 @@ iface = gr.Interface(
|
|
113 |
#demo = gr.Parallel(greeter_1, greeter_2)
|
114 |
|
115 |
#generator1 = gr.Interface(lambda name: f"Hello {name}!", inputs="textbox", outputs=gr.Textbox(label="GPT2-Large")).load("huggingface/gpt2-large", api_key=HF_TOKEN)
|
116 |
-
generator1 = gr.Interface(lambda name: f"Hello {name}!", inputs="textbox", outputs=gr.Textbox(label="GPT2-Large")
|
117 |
generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B", api_key=HF_TOKEN)
|
118 |
generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=HF_TOKEN)
|
119 |
|
|
|
|
|
|
|
120 |
|
121 |
gr.Parallel(generator1,
|
122 |
generator2,
|
123 |
generator3,
|
124 |
-
inputs = gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence."),
|
125 |
examples=examples,
|
126 |
title="Mindfulness Story Generation with Persistent Dataset Memory",
|
127 |
description=f"Mindfulness Story Generation with Persistent Dataset Memory",
|
|
|
113 |
#demo = gr.Parallel(greeter_1, greeter_2)
|
114 |
|
115 |
#generator1 = gr.Interface(lambda name: f"Hello {name}!", inputs="textbox", outputs=gr.Textbox(label="GPT2-Large")).load("huggingface/gpt2-large", api_key=HF_TOKEN)
|
116 |
+
generator1 = gr.Interface(lambda name: f"Hello {name}!", inputs="textbox", outputs=gr.Textbox(label="GPT2-Large")).load("huggingface/gpt2-large", api_key=HF_TOKEN)
|
117 |
generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B", api_key=HF_TOKEN)
|
118 |
generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=HF_TOKEN)
|
119 |
|
120 |
+
gr.Textbox("GPT2-Large").change(persist_memory,inputs="textbox",outputs=gr.Textbox(label="PersistMemoryOutput"))
|
121 |
+
btnSave = gr.Button("Save")
|
122 |
+
btnSave.click(fn=persist_memory, inputs=gr.Textbox("Inputs"), outputs=gr.Textbox("Inputs"))
|
123 |
|
124 |
gr.Parallel(generator1,
|
125 |
generator2,
|
126 |
generator3,
|
127 |
+
inputs = gr.inputs.Textbox(label="Input1", lines=5, label="Enter a sentence to get another sentence."),
|
128 |
examples=examples,
|
129 |
title="Mindfulness Story Generation with Persistent Dataset Memory",
|
130 |
description=f"Mindfulness Story Generation with Persistent Dataset Memory",
|