RayLee commited on
Commit
ea2ac7e
·
verified ·
1 Parent(s): 03d0e97

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. app.py +10 -20
  2. space.py +9 -19
  3. src/demo/app.py +10 -20
  4. src/demo/space.py +9 -19
app.py CHANGED
@@ -105,25 +105,14 @@ with gr.Blocks(title="Markdown Label Demo") as demo:
105
  gr.Markdown("# MarkdownLabel Component Demo")
106
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
107
 
108
- with gr.Row():
109
- with gr.Column():
110
- gr.Markdown("## Full Featured Example")
111
- gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
112
- MarkdownLabel(
113
- value=example_data,
114
- label="AI Research Report - Mixed Highlighting",
115
- show_side_panel=True,
116
- panel_width="350px"
117
- )
118
-
119
- with gr.Column():
120
- gr.Markdown("## Compact View")
121
- gr.Markdown("Same content without the side panel for a cleaner interface.")
122
- MarkdownLabel(
123
- value=example_data,
124
- label="Compact View",
125
- show_side_panel=False
126
- )
127
 
128
  # Simple position-based example
129
  simple_example = {
@@ -159,7 +148,8 @@ with gr.Blocks(title="Markdown Label Demo") as demo:
159
  value=simple_example,
160
  label="Simple Position vs Term Example",
161
  show_side_panel=True,
162
- panel_width="300px"
 
163
  )
164
 
165
  if __name__ == "__main__":
 
105
  gr.Markdown("# MarkdownLabel Component Demo")
106
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
107
 
108
+ gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
109
+ MarkdownLabel(
110
+ value=example_data,
111
+ label="AI Research Report - Mixed Highlighting",
112
+ show_side_panel=True,
113
+ panel_width="350px",
114
+ interactive=True
115
+ )
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  # Simple position-based example
118
  simple_example = {
 
148
  value=simple_example,
149
  label="Simple Position vs Term Example",
150
  show_side_panel=True,
151
+ panel_width="300px",
152
+ interactive=True
153
  )
154
 
155
  if __name__ == "__main__":
space.py CHANGED
@@ -145,25 +145,15 @@ with gr.Blocks(title="Markdown Label Demo") as demo:
145
  gr.Markdown("# MarkdownLabel Component Demo")
146
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
147
 
148
- with gr.Row():
149
- with gr.Column():
150
- gr.Markdown("## Full Featured Example")
151
- gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
152
- MarkdownLabel(
153
- value=example_data,
154
- label="AI Research Report - Mixed Highlighting",
155
- show_side_panel=True,
156
- panel_width="350px"
157
- )
158
-
159
- with gr.Column():
160
- gr.Markdown("## Compact View")
161
- gr.Markdown("Same content without the side panel for a cleaner interface.")
162
- MarkdownLabel(
163
- value=example_data,
164
- label="Compact View",
165
- show_side_panel=False
166
- )
167
 
168
  # Simple position-based example
169
  simple_example = {
 
145
  gr.Markdown("# MarkdownLabel Component Demo")
146
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
147
 
148
+ gr.Markdown("## Example")
149
+ gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
150
+ MarkdownLabel(
151
+ value=example_data,
152
+ label="AI Research Report - Mixed Highlighting",
153
+ show_side_panel=True,
154
+ panel_width="350px",
155
+ interactive=True
156
+ )
 
 
 
 
 
 
 
 
 
 
157
 
158
  # Simple position-based example
159
  simple_example = {
src/demo/app.py CHANGED
@@ -105,25 +105,14 @@ with gr.Blocks(title="Markdown Label Demo") as demo:
105
  gr.Markdown("# MarkdownLabel Component Demo")
106
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
107
 
108
- with gr.Row():
109
- with gr.Column():
110
- gr.Markdown("## Full Featured Example")
111
- gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
112
- MarkdownLabel(
113
- value=example_data,
114
- label="AI Research Report - Mixed Highlighting",
115
- show_side_panel=True,
116
- panel_width="350px"
117
- )
118
-
119
- with gr.Column():
120
- gr.Markdown("## Compact View")
121
- gr.Markdown("Same content without the side panel for a cleaner interface.")
122
- MarkdownLabel(
123
- value=example_data,
124
- label="Compact View",
125
- show_side_panel=False
126
- )
127
 
128
  # Simple position-based example
129
  simple_example = {
@@ -159,7 +148,8 @@ with gr.Blocks(title="Markdown Label Demo") as demo:
159
  value=simple_example,
160
  label="Simple Position vs Term Example",
161
  show_side_panel=True,
162
- panel_width="300px"
 
163
  )
164
 
165
  if __name__ == "__main__":
 
105
  gr.Markdown("# MarkdownLabel Component Demo")
106
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
107
 
108
+ gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
109
+ MarkdownLabel(
110
+ value=example_data,
111
+ label="AI Research Report - Mixed Highlighting",
112
+ show_side_panel=True,
113
+ panel_width="350px",
114
+ interactive=True
115
+ )
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  # Simple position-based example
118
  simple_example = {
 
148
  value=simple_example,
149
  label="Simple Position vs Term Example",
150
  show_side_panel=True,
151
+ panel_width="300px",
152
+ interactive=True
153
  )
154
 
155
  if __name__ == "__main__":
src/demo/space.py CHANGED
@@ -145,25 +145,15 @@ with gr.Blocks(title="Markdown Label Demo") as demo:
145
  gr.Markdown("# MarkdownLabel Component Demo")
146
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
147
 
148
- with gr.Row():
149
- with gr.Column():
150
- gr.Markdown("## Full Featured Example")
151
- gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
152
- MarkdownLabel(
153
- value=example_data,
154
- label="AI Research Report - Mixed Highlighting",
155
- show_side_panel=True,
156
- panel_width="350px"
157
- )
158
-
159
- with gr.Column():
160
- gr.Markdown("## Compact View")
161
- gr.Markdown("Same content without the side panel for a cleaner interface.")
162
- MarkdownLabel(
163
- value=example_data,
164
- label="Compact View",
165
- show_side_panel=False
166
- )
167
 
168
  # Simple position-based example
169
  simple_example = {
 
145
  gr.Markdown("# MarkdownLabel Component Demo")
146
  gr.Markdown("This demo showcases the MarkdownLabel component with **both term-based and position-based** interactive highlighting and detailed side panel.")
147
 
148
+ gr.Markdown("## Example")
149
+ gr.Markdown("Includes both term-based (e.g., 'artificial intelligence') and position-based highlighting (yellow highlights).")
150
+ MarkdownLabel(
151
+ value=example_data,
152
+ label="AI Research Report - Mixed Highlighting",
153
+ show_side_panel=True,
154
+ panel_width="350px",
155
+ interactive=True
156
+ )
 
 
 
 
 
 
 
 
 
 
157
 
158
  # Simple position-based example
159
  simple_example = {