Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=HF_TOK
|
|
124 |
#MemoryChange=tbOutput.change(persist_memory,inputs=[tbOutput],outputs=gr.Textbox(label="PersistMemoryOutput"))
|
125 |
SplitterInputBox = gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence.")
|
126 |
|
127 |
-
def
|
128 |
if name and message:
|
129 |
with open(DATA_FILE, "a") as csvfile:
|
130 |
writer = csv.DictWriter(csvfile, fieldnames=["name", "message", "time"])
|
@@ -142,9 +142,12 @@ with gradio.Blocks() as Memory:
|
|
142 |
gr.Markdown("Mindfulness Story Generation with Persistent Dataset Memory")
|
143 |
with gr.Row():
|
144 |
inp = gr.Textbox(placeholder="What text would you like to extend with generation?")
|
|
|
145 |
out = gr.Textbox()
|
|
|
|
|
146 |
btn = gr.Button("Run")
|
147 |
-
btn.click(fn=
|
148 |
|
149 |
Memory.launch()
|
150 |
|
|
|
124 |
#MemoryChange=tbOutput.change(persist_memory,inputs=[tbOutput],outputs=gr.Textbox(label="PersistMemoryOutput"))
|
125 |
SplitterInputBox = gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence.")
|
126 |
|
127 |
+
def AIMemory(name: str, message: str):
|
128 |
if name and message:
|
129 |
with open(DATA_FILE, "a") as csvfile:
|
130 |
writer = csv.DictWriter(csvfile, fieldnames=["name", "message", "time"])
|
|
|
142 |
gr.Markdown("Mindfulness Story Generation with Persistent Dataset Memory")
|
143 |
with gr.Row():
|
144 |
inp = gr.Textbox(placeholder="What text would you like to extend with generation?")
|
145 |
+
inp2 = gr.Textbox(placeholder="What text would you like to extend with generation?")
|
146 |
out = gr.Textbox()
|
147 |
+
out2 = gr.Textbox()
|
148 |
+
out3 = gr.Textbox()
|
149 |
btn = gr.Button("Run")
|
150 |
+
btn.click(fn=AIMemory, inputs=[inp,inp], outputs=[out,out2,out3])
|
151 |
|
152 |
Memory.launch()
|
153 |
|