Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -87,8 +87,6 @@ def full_interface(prompt, max_new_tokens, top_k, temperature, top_p, repetition
|
|
87 |
def reset_interface():
|
88 |
return gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)
|
89 |
|
90 |
-
import gradio as gr
|
91 |
-
|
92 |
with gr.Blocks(theme=gr.themes.Base()) as iface:
|
93 |
|
94 |
gr.Markdown("""
|
@@ -111,10 +109,11 @@ with gr.Blocks(theme=gr.themes.Base()) as iface:
|
|
111 |
dependency_parse_input = gr.HTML(label="👁️Visualization")
|
112 |
|
113 |
send_button = gr.Button(value="🎅🏻⌚OCRonos-Vintage 👁️Visualization", visible=False)
|
114 |
-
dependency_parse_generated = gr.HTML(label="Dependency Parse Visualization (Generated Text)")
|
|
|
115 |
send_button.click(
|
116 |
generate_dependency_parse,
|
117 |
-
inputs=[
|
118 |
outputs=[dependency_parse_generated]
|
119 |
)
|
120 |
|
@@ -124,7 +123,7 @@ with gr.Blocks(theme=gr.themes.Base()) as iface:
|
|
124 |
generate_button.click(
|
125 |
full_interface,
|
126 |
inputs=[prompt, max_new_tokens, top_k, temperature, top_p, repetition_penalty],
|
127 |
-
outputs=[generated_text_output, highlighted_text, tokenizer_info, dependency_parse_input, send_button,
|
128 |
)
|
129 |
|
130 |
reset_button.click(
|
|
|
87 |
def reset_interface():
|
88 |
return gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)
|
89 |
|
|
|
|
|
90 |
with gr.Blocks(theme=gr.themes.Base()) as iface:
|
91 |
|
92 |
gr.Markdown("""
|
|
|
109 |
dependency_parse_input = gr.HTML(label="👁️Visualization")
|
110 |
|
111 |
send_button = gr.Button(value="🎅🏻⌚OCRonos-Vintage 👁️Visualization", visible=False)
|
112 |
+
dependency_parse_generated = gr.HTML(label="Dependency Parse Visualization (Generated Text)", visible=False)
|
113 |
+
|
114 |
send_button.click(
|
115 |
generate_dependency_parse,
|
116 |
+
inputs=[generated_text_output],
|
117 |
outputs=[dependency_parse_generated]
|
118 |
)
|
119 |
|
|
|
123 |
generate_button.click(
|
124 |
full_interface,
|
125 |
inputs=[prompt, max_new_tokens, top_k, temperature, top_p, repetition_penalty],
|
126 |
+
outputs=[generated_text_output, highlighted_text, tokenizer_info, dependency_parse_input, send_button, generated_text_output, generate_button, reset_button]
|
127 |
)
|
128 |
|
129 |
reset_button.click(
|