derek-thomas HF staff commited on
Commit
aeb2044
1 Parent(s): ba7deb1

Adding nomic embedded

Browse files
Files changed (1) hide show
  1. app.py +45 -0
app.py CHANGED
@@ -28,9 +28,54 @@ This space is triggered by a webhook for changes on
28
  [https://huggingface.co/datasets/derek-thomas/reddit-bestofredditorupdates-processed](https://huggingface.co/datasets/derek-thomas/reddit-bestofredditorupdates-processed)
29
  """
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  with gr.Blocks() as ui:
32
  with gr.Tab("Application"):
33
  gr.Markdown(intro_md)
 
 
 
34
  output = gr.HTML(log_file_to_html_string, every=1)
35
 
36
  app = WebhooksServer(ui=ui.queue(), webhook_secret=WEBHOOK_SECRET)
 
28
  [https://huggingface.co/datasets/derek-thomas/reddit-bestofredditorupdates-processed](https://huggingface.co/datasets/derek-thomas/reddit-bestofredditorupdates-processed)
29
  """
30
 
31
+ html_str = """
32
+ <html>
33
+
34
+ <head>
35
+ <title>conll2003</title>
36
+ <style>
37
+ body {
38
+ font-family: Arial, sans-serif;
39
+ background-color: #f0f0f0;
40
+ display: flex;
41
+ justify-content: center;
42
+ align-items: center;
43
+ height: 100vh;
44
+ margin: 0;
45
+ padding: 0;
46
+ color: #333;
47
+ }
48
+ .iframe-container {
49
+ border: 1px solid #ccc;
50
+ border-radius: 10px;
51
+ overflow: hidden;
52
+ width: 80%;
53
+ height: 80%;
54
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
55
+ }
56
+ iframe {
57
+ width: 100%;
58
+ height: 100%;
59
+ border: none;
60
+ }
61
+ </style>
62
+ </head>
63
+
64
+ <body>
65
+ <div class="iframe-container">
66
+ <iframe src="https://atlas.nomic.ai/data/derek2/boru-subreddit-neural-search/map/cdd8c890-2fac-4ea6-91f8-e6821203cfcb" allow="clipboard-read; clipboard-write"
67
+ title="Nomic Atlas"></iframe>
68
+ </div>
69
+ </body>
70
+
71
+ </html>"""
72
+
73
  with gr.Blocks() as ui:
74
  with gr.Tab("Application"):
75
  gr.Markdown(intro_md)
76
+ gr.HTML(html_str)
77
+ with gr.Tab("Logs"):
78
+ gr.Markdown("# Logs")
79
  output = gr.HTML(log_file_to_html_string, every=1)
80
 
81
  app = WebhooksServer(ui=ui.queue(), webhook_secret=WEBHOOK_SECRET)