Spaces:
Runtime error
Runtime error
Commit
•
08d3eb0
1
Parent(s):
9930cd7
Updating html for iframe
Browse files- app.py +2 -41
- src/my_logger.py +4 -4
app.py
CHANGED
@@ -32,47 +32,8 @@ This space is triggered by a webhook for changes on
|
|
32 |
Check out the original on [Nomic](https://atlas.nomic.ai/data/derek2/boru-subreddit-neural-search/map)
|
33 |
"""
|
34 |
|
35 |
-
|
36 |
-
<
|
37 |
-
|
38 |
-
<head>
|
39 |
-
<title>conll2003</title>
|
40 |
-
<style>
|
41 |
-
body {
|
42 |
-
font-family: Arial, sans-serif;
|
43 |
-
background-color: #f0f0f0;
|
44 |
-
display: flex;
|
45 |
-
justify-content: center;
|
46 |
-
align-items: center;
|
47 |
-
height: 100vh;
|
48 |
-
margin: 0;
|
49 |
-
padding: 0;
|
50 |
-
color: #333;
|
51 |
-
}
|
52 |
-
.iframe-container {
|
53 |
-
border: 1px solid #ccc;
|
54 |
-
border-radius: 10px;
|
55 |
-
overflow: hidden;
|
56 |
-
width: 80%;
|
57 |
-
height: 80%;
|
58 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
59 |
-
}
|
60 |
-
iframe {
|
61 |
-
width: 100%;
|
62 |
-
height: 100%;
|
63 |
-
border: none;
|
64 |
-
}
|
65 |
-
</style>
|
66 |
-
</head>
|
67 |
-
|
68 |
-
<body>
|
69 |
-
<div class="iframe-container">
|
70 |
-
<iframe src="https://atlas.nomic.ai/data/derek2/boru-subreddit-neural-search/map/cdd8c890-2fac-4ea6-91f8-e6821203cfcb" allow="clipboard-read; clipboard-write"
|
71 |
-
title="Nomic Atlas"></iframe>
|
72 |
-
</div>
|
73 |
-
</body>
|
74 |
-
|
75 |
-
</html>"""
|
76 |
|
77 |
with gr.Blocks() as ui:
|
78 |
with gr.Tab("Application"):
|
|
|
32 |
Check out the original on [Nomic](https://atlas.nomic.ai/data/derek2/boru-subreddit-neural-search/map)
|
33 |
"""
|
34 |
|
35 |
+
url = "https://atlas.nomic.ai/data/derek2/boru-subreddit-neural-search/map/cdd8c890-2fac-4ea6-91f8-e6821203cfcb"
|
36 |
+
html_str = f'<iframe src={url} style="border:none;height:1024px;width:100%" allow="clipboard-read; clipboard-write" title="Nomic Atlas">'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
with gr.Blocks() as ui:
|
39 |
with gr.Tab("Application"):
|
src/my_logger.py
CHANGED
@@ -14,9 +14,9 @@ def setup_logger(name: str):
|
|
14 |
logger.addHandler(file_handler)
|
15 |
|
16 |
# Create a stream handler to write logs to the console
|
17 |
-
stream_handler = logging.StreamHandler()
|
18 |
-
stream_handler.setLevel(logging.DEBUG)
|
19 |
-
stream_handler.setFormatter(formatter)
|
20 |
-
logger.addHandler(stream_handler)
|
21 |
|
22 |
return logger
|
|
|
14 |
logger.addHandler(file_handler)
|
15 |
|
16 |
# Create a stream handler to write logs to the console
|
17 |
+
# stream_handler = logging.StreamHandler()
|
18 |
+
# stream_handler.setLevel(logging.DEBUG)
|
19 |
+
# stream_handler.setFormatter(formatter)
|
20 |
+
# logger.addHandler(stream_handler)
|
21 |
|
22 |
return logger
|