radames commited on
Commit
ec89dea
1 Parent(s): b23f1a7

copy edits

Browse files
Files changed (1) hide show
  1. client/src/routes/index.svelte +37 -12
client/src/routes/index.svelte CHANGED
@@ -57,7 +57,7 @@
57
  </script>
58
 
59
  <article class="prose px-6 py-3 max-w-4xl mx-auto">
60
- <h1 class="font-serif mb-0">The New York Times Homepage</h1>
61
  <h5 class="mt-0 {lastUpdate ? 'visibile' : 'invisible'}">
62
  <b>Last Updated:</b>
63
  {lastUpdate ? lastUpdate.toLocaleString() : ''}
@@ -108,22 +108,47 @@
108
  >Node script</a
109
  >
110
 
111
- install node LTS and create symbolic links to <code>/home/user/.local/bin/</code> as it seems like we don't
112
- have permission to update $PATH env
113
  </p>
114
  <h4>main.py</h4>
115
  <p class="max-w-prose leading-normal">
116
- Because the Spaces run a python application, see "app_file" on docs. main.py is just a simple
117
- python subprocess to make make", "build-all Makefile
118
- https://huggingface.co/spaces/radames/NYTimes-homepage-rearranged/blob/main/Makefile
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  </p>
120
  <h4>SvelteKit Node Adapter?</h4>
121
  <p class="max-w-prose leading-normal">
122
- SvelteKit eventually can be used as our primary web application with the
123
- @sveltejs/adapter-node with Node and Flask the API application with your ML project. However,
124
- there is an open issue to enable dynamic basepath, which blocks the possibility to embedded
125
- deployment or relative path. https://github.com/sveltejs/kit/issues/595
126
- https://huggingface.co/spaces/radames/NYTimes-homepage-rearranged/blob/main/main.py
 
 
 
 
 
 
 
 
 
 
127
  </p>
128
  </details>
129
 
@@ -155,7 +180,7 @@
155
  Loading the NYTimes homepage feed and running sentiment analysis on headlines...
156
  </div>
157
  {:then data}
158
- <ul class="m-0 p-0">
159
  {#each predictions as entry, i}
160
  <li class="py-5">
161
  <NewsBlock feedEntry={entry} />
 
57
  </script>
58
 
59
  <article class="prose px-6 py-3 max-w-4xl mx-auto">
60
+ <h1 class="font-serif mb-0">The New York Times Sentiment Analysis</h1>
61
  <h5 class="mt-0 {lastUpdate ? 'visibile' : 'invisible'}">
62
  <b>Last Updated:</b>
63
  {lastUpdate ? lastUpdate.toLocaleString() : ''}
 
108
  >Node script</a
109
  >
110
 
111
+ install node LTS and create symbolic links to <code>/home/user/.local/bin/</code> as it seems like
112
+ we don't have permission to update $PATH env
113
  </p>
114
  <h4>main.py</h4>
115
  <p class="max-w-prose leading-normal">
116
+ Because the Spaces run a python application, see
117
+ <a
118
+ class="text-blue-500 underline hover:no-underline"
119
+ target="_blank"
120
+ href="https://huggingface.co/docs/hub/spaces#:~:text=0.88.0%2C%200.89.0%2C%201.0.0.-,app_file,-%3A%20string%0APath%20to"
121
+ >
122
+ <code> app_file </code>
123
+ </a>
124
+ on docs. <b>main.py</b> is just a simple python subprocess to run
125
+ <code> make build-all </code>
126
+ See
127
+ <a
128
+ class="text-blue-500 underline hover:no-underline"
129
+ target="_blank"
130
+ href="https://huggingface.co/spaces/radames/NYTimes-homepage-rearranged/blob/main/Makefile"
131
+ >
132
+ <code>Makefile</code>
133
+ </a>
134
  </p>
135
  <h4>SvelteKit Node Adapter?</h4>
136
  <p class="max-w-prose leading-normal">
137
+ SvelteKit eventually can be used as our primary web application with
138
+ <a
139
+ class="text-blue-500 underline hover:no-underline"
140
+ target="_blank"
141
+ href="https://github.com/sveltejs/kit/tree/master/packages/adapter-node"
142
+ >
143
+ <code>@sveltejs/adapter-node</code> </a
144
+ >adaptor and Flask the API application with your ML project. However, there is an unsolved
145
+ issue to enable
146
+ <a
147
+ href="https://github.com/sveltejs/kit/issues/595"
148
+ class="text-blue-500 underline hover:no-underline"
149
+ >
150
+ dynamic basepath</a
151
+ >, which blocks the possibility to embedded deployment or using a relative path.
152
  </p>
153
  </details>
154
 
 
180
  Loading the NYTimes homepage feed and running sentiment analysis on headlines...
181
  </div>
182
  {:then data}
183
+ <ul class="m-0 p-0">
184
  {#each predictions as entry, i}
185
  <li class="py-5">
186
  <NewsBlock feedEntry={entry} />