Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -146,6 +146,8 @@ paperid: {paperid}
|
|
146 |
with fs.open(datasetdir+paperid+".md", "w") as f:
|
147 |
raw = metadata + data
|
148 |
f.write(raw)
|
|
|
|
|
149 |
with gr.Blocks(css=basecss, js=jscode, theme='NoCrypt/miku') as demo:
|
150 |
with gr.Tab("search"):
|
151 |
with gr.Row():
|
@@ -174,7 +176,7 @@ with gr.Blocks(css=basecss, js=jscode, theme='NoCrypt/miku') as demo:
|
|
174 |
with gr.Row():
|
175 |
status = gr.Textbox(label="status", lines=1, interactive=False)
|
176 |
publishbutton = gr.Button("publish")
|
177 |
-
previewbutton.click(fn=
|
178 |
publishbutton.click(fn=publish_paper, inputs=[title, authors, tags, abst, markd], outputs=status)
|
179 |
searchbutton.click(fn=make_paper_cards, inputs=query, outputs=papercards)
|
180 |
readbutton.click(fn=get_paper_markdown, inputs=paperid, outputs=paper)
|
|
|
146 |
with fs.open(datasetdir+paperid+".md", "w") as f:
|
147 |
raw = metadata + data
|
148 |
f.write(raw)
|
149 |
+
def makepreview(x):
|
150 |
+
return x
|
151 |
with gr.Blocks(css=basecss, js=jscode, theme='NoCrypt/miku') as demo:
|
152 |
with gr.Tab("search"):
|
153 |
with gr.Row():
|
|
|
176 |
with gr.Row():
|
177 |
status = gr.Textbox(label="status", lines=1, interactive=False)
|
178 |
publishbutton = gr.Button("publish")
|
179 |
+
previewbutton.click(fn=makepreview, inputs=markd, outputs=preview)
|
180 |
publishbutton.click(fn=publish_paper, inputs=[title, authors, tags, abst, markd], outputs=status)
|
181 |
searchbutton.click(fn=make_paper_cards, inputs=query, outputs=papercards)
|
182 |
readbutton.click(fn=get_paper_markdown, inputs=paperid, outputs=paper)
|