Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Remove css
Browse files- src/app.py +3 -3
src/app.py
CHANGED
@@ -4,7 +4,7 @@ from template import get_templates
|
|
4 |
|
5 |
templates = get_templates()
|
6 |
|
7 |
-
def change(inp
|
8 |
"""Based on an `inp`, render and highlight the appropriate code sample.
|
9 |
|
10 |
Args:
|
@@ -12,7 +12,7 @@ def change(inp, components=[]):
|
|
12 |
The input button from the interface.
|
13 |
|
14 |
Returns:
|
15 |
-
`tuple`: A tuple of the
|
16 |
"""
|
17 |
code, explanation, docs = get_text(inp)
|
18 |
if inp == "Basic":
|
@@ -28,7 +28,7 @@ def change(inp, components=[]):
|
|
28 |
initial_md = gr.Markdown("## Initial Code")
|
29 |
initial_code = gr.Markdown(templates["initial"])
|
30 |
|
31 |
-
with gr.Blocks(
|
32 |
inp = gr.Radio(
|
33 |
["Basic", "Calculating Metrics", "Checkpointing", "Experiment Tracking", "Gradient Accumulation"],
|
34 |
label="Select a feature you would like to integrate"
|
|
|
4 |
|
5 |
templates = get_templates()
|
6 |
|
7 |
+
def change(inp):
|
8 |
"""Based on an `inp`, render and highlight the appropriate code sample.
|
9 |
|
10 |
Args:
|
|
|
12 |
The input button from the interface.
|
13 |
|
14 |
Returns:
|
15 |
+
`tuple`: A tuple of the highlighted code diff, and the title for the section.
|
16 |
"""
|
17 |
code, explanation, docs = get_text(inp)
|
18 |
if inp == "Basic":
|
|
|
28 |
initial_md = gr.Markdown("## Initial Code")
|
29 |
initial_code = gr.Markdown(templates["initial"])
|
30 |
|
31 |
+
with gr.Blocks() as demo:
|
32 |
inp = gr.Radio(
|
33 |
["Basic", "Calculating Metrics", "Checkpointing", "Experiment Tracking", "Gradient Accumulation"],
|
34 |
label="Select a feature you would like to integrate"
|