Spaces:
Running
Running
Minor details
Browse files- app.py +15 -8
- utils/notebook_utils.py +1 -1
app.py
CHANGED
@@ -195,10 +195,17 @@ def generate_cells(dataset_id, cells, notebook_type="eda"):
|
|
195 |
)
|
196 |
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
with gr.Blocks(
|
199 |
fill_height=True,
|
200 |
fill_width=True,
|
201 |
-
css=
|
202 |
) as demo:
|
203 |
gr.Markdown("# π€ Dataset notebook creator π΅οΈ")
|
204 |
with gr.Row(equal_height=True):
|
@@ -236,13 +243,13 @@ with gr.Blocks(
|
|
236 |
if not name:
|
237 |
return gr.Markdown("### No dataset provided")
|
238 |
html_code = f"""
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
return gr.HTML(value=html_code, elem_classes="viewer")
|
247 |
|
248 |
with gr.Row():
|
|
|
195 |
)
|
196 |
|
197 |
|
198 |
+
css = """
|
199 |
+
#box {
|
200 |
+
height: 650px;
|
201 |
+
overflow-y: scroll !important;
|
202 |
+
}
|
203 |
+
"""
|
204 |
+
|
205 |
with gr.Blocks(
|
206 |
fill_height=True,
|
207 |
fill_width=True,
|
208 |
+
css=css,
|
209 |
) as demo:
|
210 |
gr.Markdown("# π€ Dataset notebook creator π΅οΈ")
|
211 |
with gr.Row(equal_height=True):
|
|
|
243 |
if not name:
|
244 |
return gr.Markdown("### No dataset provided")
|
245 |
html_code = f"""
|
246 |
+
<iframe
|
247 |
+
src="https://huggingface.co/datasets/{name}/embed/viewer/default/train"
|
248 |
+
frameborder="0"
|
249 |
+
width="100%"
|
250 |
+
height="350px"
|
251 |
+
></iframe>
|
252 |
+
"""
|
253 |
return gr.HTML(value=html_code, elem_classes="viewer")
|
254 |
|
255 |
with gr.Row():
|
utils/notebook_utils.py
CHANGED
@@ -365,7 +365,7 @@ index.add(vectors)
|
|
365 |
"cell_type": "code",
|
366 |
"source": """
|
367 |
# Specify the text you want to search for in the list
|
368 |
-
query = "How to
|
369 |
|
370 |
# Generate the embedding for the search query
|
371 |
query_embedding = model.encode([query])
|
|
|
365 |
"cell_type": "code",
|
366 |
"source": """
|
367 |
# Specify the text you want to search for in the list
|
368 |
+
query = "How to cook sushi?"
|
369 |
|
370 |
# Generate the embedding for the search query
|
371 |
query_embedding = model.encode([query])
|