Commit
Β·
8f7a71c
1
Parent(s):
184677e
more
Browse files- .gitignore +30 -0
- app.py +2 -8
.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
__pycache__
|
| 3 |
+
venv
|
| 4 |
+
env
|
| 5 |
+
.env
|
| 6 |
+
.venv
|
| 7 |
+
.pytest_cache
|
| 8 |
+
.coverage
|
| 9 |
+
.idea
|
| 10 |
+
.vscode
|
| 11 |
+
lightning_logs
|
| 12 |
+
.ipynb_checkpoints
|
| 13 |
+
.ckpt
|
| 14 |
+
example.ckpt
|
| 15 |
+
.neptune
|
| 16 |
+
logs_for_plots
|
| 17 |
+
logs_for_heuristics
|
| 18 |
+
logs_for_graphs
|
| 19 |
+
logs_for_freedom_maps
|
| 20 |
+
logs_for_experiments
|
| 21 |
+
heuristic_tables
|
| 22 |
+
stats
|
| 23 |
+
videos
|
| 24 |
+
algs_RL/stasts
|
| 25 |
+
.DS_Store
|
| 26 |
+
saved_replays
|
| 27 |
+
my_folder
|
| 28 |
+
results
|
| 29 |
+
test-trainer
|
| 30 |
+
.gradio
|
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import pyperclip
|
| 3 |
-
from sympy.solvers.ode.lie_group import lie_heuristics
|
| 4 |
|
| 5 |
def example_func():
|
| 6 |
example = "example_1.txt"
|
|
@@ -50,7 +49,7 @@ def build_table_of_contents(text, as_links_bool):
|
|
| 50 |
continue
|
| 51 |
title += i
|
| 52 |
if as_links_bool:
|
| 53 |
-
out_text += f' [{title}]()'
|
| 54 |
else:
|
| 55 |
out_text += title
|
| 56 |
return out_text
|
|
@@ -63,7 +62,7 @@ def paste_func():
|
|
| 63 |
def copy_to_clipboard_func(text):
|
| 64 |
# print(text)
|
| 65 |
pyperclip.copy(text) # Copies to clipboard
|
| 66 |
-
gr.Info("βΉοΈ Copied", duration=
|
| 67 |
|
| 68 |
|
| 69 |
with gr.Blocks() as demo:
|
|
@@ -81,16 +80,11 @@ with gr.Blocks() as demo:
|
|
| 81 |
example_btn = gr.Button("""π Paste an Example""")
|
| 82 |
with gr.Column():
|
| 83 |
copy_btn = gr.Button("""π Copy to Clipboard""")
|
| 84 |
-
# out1 = gr.Textbox(lines=30, max_lines=None, label='After Preprocessing:')
|
| 85 |
out2 = gr.Textbox(lines=30, max_lines=None, label='Output Table of Contents as a Markdown text:')
|
| 86 |
-
# copy_btn = gr.HTML("""<button>π Copy</button>""")
|
| 87 |
-
# btn = gr.Button("Build a Table of contents")
|
| 88 |
-
# btn.click(fn=update, inputs=inp, outputs=out)
|
| 89 |
paste_btn.click(fn=paste_func, inputs=None, outputs=inp)
|
| 90 |
example_btn.click(fn=example_func, inputs=None, outputs=inp)
|
| 91 |
inp.change(fn=build_table_of_contents, inputs=[inp, as_links], outputs=out2)
|
| 92 |
as_links.change(fn=build_table_of_contents, inputs=[inp, as_links], outputs=out2)
|
| 93 |
-
# inp.change(fn=prep_func, inputs=inp, outputs=out1)
|
| 94 |
copy_btn.click(fn=copy_to_clipboard_func, inputs=out2, outputs=None)
|
| 95 |
|
| 96 |
demo.launch(debug=True)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import pyperclip
|
|
|
|
| 3 |
|
| 4 |
def example_func():
|
| 5 |
example = "example_1.txt"
|
|
|
|
| 49 |
continue
|
| 50 |
title += i
|
| 51 |
if as_links_bool:
|
| 52 |
+
out_text += f' [{title[1:]}]()'
|
| 53 |
else:
|
| 54 |
out_text += title
|
| 55 |
return out_text
|
|
|
|
| 62 |
def copy_to_clipboard_func(text):
|
| 63 |
# print(text)
|
| 64 |
pyperclip.copy(text) # Copies to clipboard
|
| 65 |
+
gr.Info("βΉοΈ Copied", duration=2)
|
| 66 |
|
| 67 |
|
| 68 |
with gr.Blocks() as demo:
|
|
|
|
| 80 |
example_btn = gr.Button("""π Paste an Example""")
|
| 81 |
with gr.Column():
|
| 82 |
copy_btn = gr.Button("""π Copy to Clipboard""")
|
|
|
|
| 83 |
out2 = gr.Textbox(lines=30, max_lines=None, label='Output Table of Contents as a Markdown text:')
|
|
|
|
|
|
|
|
|
|
| 84 |
paste_btn.click(fn=paste_func, inputs=None, outputs=inp)
|
| 85 |
example_btn.click(fn=example_func, inputs=None, outputs=inp)
|
| 86 |
inp.change(fn=build_table_of_contents, inputs=[inp, as_links], outputs=out2)
|
| 87 |
as_links.change(fn=build_table_of_contents, inputs=[inp, as_links], outputs=out2)
|
|
|
|
| 88 |
copy_btn.click(fn=copy_to_clipboard_func, inputs=out2, outputs=None)
|
| 89 |
|
| 90 |
demo.launch(debug=True)
|