Spaces:
Sleeping
Sleeping
with gr.Blocks(head=HEAD) as demo:
Browse files
app.py
CHANGED
|
@@ -453,7 +453,7 @@ def generate_mind_map(df_string):
|
|
| 453 |
}
|
| 454 |
|
| 455 |
response = client.chat.completions.create(**request_payload)
|
| 456 |
-
mind_map = response.choices[0].message.content.strip()
|
| 457 |
print("=====mind_map=====")
|
| 458 |
print(mind_map)
|
| 459 |
print("=====mind_map=====")
|
|
@@ -811,19 +811,20 @@ def next_slide():
|
|
| 811 |
def get_video_id():
|
| 812 |
return VIDEO_ID
|
| 813 |
|
| 814 |
-
|
| 815 |
-
<
|
| 816 |
-
"""
|
| 817 |
-
|
| 818 |
-
CSS = """
|
| 819 |
svg.markmap {{
|
| 820 |
width: 100%;
|
| 821 |
height: 100vh;
|
| 822 |
}}
|
|
|
|
|
|
|
| 823 |
"""
|
| 824 |
|
| 825 |
|
| 826 |
-
with gr.Blocks(
|
| 827 |
with gr.Row():
|
| 828 |
with gr.Column():
|
| 829 |
file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
|
|
@@ -857,7 +858,7 @@ with gr.Blocks(js=JS, css=CSS) as demo:
|
|
| 857 |
gr.Markdown("## ιζ°ηζει‘")
|
| 858 |
btn_create_question = gr.Button("Create Questions")
|
| 859 |
with gr.Tab("markdown"):
|
| 860 |
-
mind_map = gr.Textbox(
|
| 861 |
with gr.Tab("εΏζΊε"):
|
| 862 |
mind_map_html = gr.HTML()
|
| 863 |
|
|
|
|
| 453 |
}
|
| 454 |
|
| 455 |
response = client.chat.completions.create(**request_payload)
|
| 456 |
+
mind_map = response.choices[0].message.content.strip()
|
| 457 |
print("=====mind_map=====")
|
| 458 |
print(mind_map)
|
| 459 |
print("=====mind_map=====")
|
|
|
|
| 811 |
def get_video_id():
|
| 812 |
return VIDEO_ID
|
| 813 |
|
| 814 |
+
HEAD = """
|
| 815 |
+
<meta charset="UTF-8">
|
| 816 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 817 |
+
<style>
|
|
|
|
| 818 |
svg.markmap {{
|
| 819 |
width: 100%;
|
| 820 |
height: 100vh;
|
| 821 |
}}
|
| 822 |
+
</style>
|
| 823 |
+
<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader@0.15.2"></script>
|
| 824 |
"""
|
| 825 |
|
| 826 |
|
| 827 |
+
with gr.Blocks(head=HEAD) as demo:
|
| 828 |
with gr.Row():
|
| 829 |
with gr.Column():
|
| 830 |
file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
|
|
|
|
| 858 |
gr.Markdown("## ιζ°ηζει‘")
|
| 859 |
btn_create_question = gr.Button("Create Questions")
|
| 860 |
with gr.Tab("markdown"):
|
| 861 |
+
mind_map = gr.Textbox()
|
| 862 |
with gr.Tab("εΏζΊε"):
|
| 863 |
mind_map_html = gr.HTML()
|
| 864 |
|