Spaces:
Runtime error
Runtime error
kevinlu1248
commited on
Commit
·
f41d2af
1
Parent(s):
fb2d1e6
minor improvements
Browse files
app.py
CHANGED
@@ -131,14 +131,15 @@ def chunk_code(
|
|
131 |
return str(e)
|
132 |
|
133 |
with gr.Blocks(css=css) as demo:
|
134 |
-
gr.Markdown("
|
|
|
135 |
|
136 |
default_file = "https://raw.githubusercontent.com/sweepai/sweep/b267b613d4c706eaf959fe6789f11e9a856521d1/sweepai/handlers/on_check_suite.py"
|
137 |
default_code = requests.get(default_file).text
|
138 |
|
139 |
with gr.Row():
|
140 |
language = gr.Dropdown(["python", "javascript", "go", "ruby", "java", "php", "c", "cpp", "rust", "haskell"], label="Language", value="python")
|
141 |
-
max_chars = gr.Slider(
|
142 |
coalesce = gr.Slider(0, 300, 100, label="Coalesce")
|
143 |
with gr.Row():
|
144 |
inp = gr.Code(placeholder="Enter the code here", label="Code to Chunk", language=language.value, lines=60, elem_classes="code_container", value=default_code)
|
|
|
131 |
return str(e)
|
132 |
|
133 |
with gr.Blocks(css=css) as demo:
|
134 |
+
gr.Markdown("## Code Chunking Demo")
|
135 |
+
gr.Markdown("Start typing below and the chunked output will automatically show up. Checkout how this algorithm works at https://docs.sweep.dev/blogs/chunking-2m-files and https://docs.sweep.dev/blogs/chunking-improvements. We also have interactive notebooks at ")
|
136 |
|
137 |
default_file = "https://raw.githubusercontent.com/sweepai/sweep/b267b613d4c706eaf959fe6789f11e9a856521d1/sweepai/handlers/on_check_suite.py"
|
138 |
default_code = requests.get(default_file).text
|
139 |
|
140 |
with gr.Row():
|
141 |
language = gr.Dropdown(["python", "javascript", "go", "ruby", "java", "php", "c", "cpp", "rust", "haskell"], label="Language", value="python")
|
142 |
+
max_chars = gr.Slider(1, 3000, 1500, label="Max Characters")
|
143 |
coalesce = gr.Slider(0, 300, 100, label="Coalesce")
|
144 |
with gr.Row():
|
145 |
inp = gr.Code(placeholder="Enter the code here", label="Code to Chunk", language=language.value, lines=60, elem_classes="code_container", value=default_code)
|