Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ with gr.Blocks() as demo:
|
|
113 |
prompt = gr.components.Textbox(lines=5, label='犯罪事實',value=crime_descrip)
|
114 |
with gr.Row():
|
115 |
with gr.Column():
|
116 |
-
btn = gr.Button("
|
117 |
# btn4 = gr.ClearButton(value="清除標註內容",components=[result, element, tag])
|
118 |
with gr.Row():
|
119 |
element = gr.components.Textbox(lines=2, label="構成要件要素")
|
@@ -126,9 +126,9 @@ with gr.Blocks() as demo:
|
|
126 |
with gr.Row():
|
127 |
with gr.Column():
|
128 |
with gr.Row():
|
129 |
-
btn2 = gr.Button("
|
130 |
with gr.Row():
|
131 |
-
btn3 = gr.Button("
|
132 |
btn.click(random_next, inputs=[], outputs=[courtName, caseNo, prompt, filename])
|
133 |
btn2.click(gen_template, inputs=[prompt, element, tag], outputs=[result])
|
134 |
btn3.click(None, inputs=[result, filename], _js=js_download)
|
|
|
113 |
prompt = gr.components.Textbox(lines=5, label='犯罪事實',value=crime_descrip)
|
114 |
with gr.Row():
|
115 |
with gr.Column():
|
116 |
+
btn = gr.Button("🎲 隨機選擇")
|
117 |
# btn4 = gr.ClearButton(value="清除標註內容",components=[result, element, tag])
|
118 |
with gr.Row():
|
119 |
element = gr.components.Textbox(lines=2, label="構成要件要素")
|
|
|
126 |
with gr.Row():
|
127 |
with gr.Column():
|
128 |
with gr.Row():
|
129 |
+
btn2 = gr.Button("📖 產生標註語料內容")
|
130 |
with gr.Row():
|
131 |
+
btn3 = gr.Button("💾 下載")
|
132 |
btn.click(random_next, inputs=[], outputs=[courtName, caseNo, prompt, filename])
|
133 |
btn2.click(gen_template, inputs=[prompt, element, tag], outputs=[result])
|
134 |
btn3.click(None, inputs=[result, filename], _js=js_download)
|