crimeacs commited on
Commit
9f6fe0d
1 Parent(s): 477eaf3

changed effect of uncertainty

Browse files
Files changed (2) hide show
  1. Gradio_app.ipynb +11 -21
  2. app.py +8 -17
Gradio_app.ipynb CHANGED
@@ -2,14 +2,14 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 64,
6
  "metadata": {},
7
  "outputs": [
8
  {
9
  "name": "stdout",
10
  "output_type": "stream",
11
  "text": [
12
- "Running on local URL: http://127.0.0.1:7904\n",
13
  "\n",
14
  "To create a public link, set `share=True` in `launch()`.\n"
15
  ]
@@ -17,7 +17,7 @@
17
  {
18
  "data": {
19
  "text/html": [
20
- "<div><iframe src=\"http://127.0.0.1:7904/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
21
  ],
22
  "text/plain": [
23
  "<IPython.core.display.HTML object>"
@@ -30,7 +30,7 @@
30
  "data": {
31
  "text/plain": []
32
  },
33
- "execution_count": 64,
34
  "metadata": {},
35
  "output_type": "execute_result"
36
  }
@@ -375,23 +375,13 @@
375
  "\n",
376
  "with gr.Blocks() as demo:\n",
377
  " gr.HTML(\"\"\"<h1>PhaseHunter</h1>\n",
378
- "<p>This app allows one to detect <mark style=\"background-color: red; color: white;\">P</mark> and <mark style=\"background-color: blue; color: white;\">S</mark> seismic phases along with \n",
379
- "\n",
380
- "<span style=\"font-size: 24px; font-weight: bold;\">\n",
381
- " <span style=\"color: #4c4c4c; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;\">u</span>\n",
382
- " <span style=\"color: #808080; text-shadow: 1px 1px 0 #bbb, -1px -1px 0 #bbb, 1px -1px 0 #bbb, -1px 1px 0 #bbb;\">n</span>\n",
383
- " <span style=\"color: #b3b3b3; text-shadow: 1px 1px 0 #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;\">c</span>\n",
384
- " <span style=\"color: #d9d9d9; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;\">e</span>\n",
385
- " <span style=\"color: #f2f2f2; text-shadow: 1px 1px 0 #eee, -1px -1px 0 #eee, 1px -1px 0 #eee, -1px 1px 0 #eee;\">r</span>\n",
386
- " <span style=\"color: #d9d9d9; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;\">t</span>\n",
387
- " <span style=\"color: #b3b3b3; text-shadow: 1px 1px 0 #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;\">a</span>\n",
388
- " <span style=\"color: #808080; text-shadow: 1px 1px 0 #bbb, -1px -1px 0 #bbb, 1px -1px 0 #bbb, -1px 1px 0 #bbb;\">i</span>\n",
389
- " <span style=\"color: #4c4c4c; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;\">n</span>\n",
390
- " <span style=\"color: #808080; text-shadow: 1px 1px 0 #bbb, -1px -1px 0 #bbb, 1px -1px 0 #bbb, -1px 1px 0 #bbb;\">t</span>\n",
391
- " <span style=\"color: #b3b3b3; text-shadow: 1px 1px 0 #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;\">y</span>\n",
392
- " \n",
393
- "</span>\n",
394
- " of the detection.</p>\n",
395
  "<ol>\n",
396
  " <li>By selecting one of the sample waveforms.</li>\n",
397
  " <li>By uploading your own waveform.</li>\n",
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 66,
6
  "metadata": {},
7
  "outputs": [
8
  {
9
  "name": "stdout",
10
  "output_type": "stream",
11
  "text": [
12
+ "Running on local URL: http://127.0.0.1:7906\n",
13
  "\n",
14
  "To create a public link, set `share=True` in `launch()`.\n"
15
  ]
 
17
  {
18
  "data": {
19
  "text/html": [
20
+ "<div><iframe src=\"http://127.0.0.1:7906/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
21
  ],
22
  "text/plain": [
23
  "<IPython.core.display.HTML object>"
 
30
  "data": {
31
  "text/plain": []
32
  },
33
+ "execution_count": 66,
34
  "metadata": {},
35
  "output_type": "execute_result"
36
  }
 
375
  "\n",
376
  "with gr.Blocks() as demo:\n",
377
  " gr.HTML(\"\"\"<h1>PhaseHunter</h1>\n",
378
+ "<p>This app allows one to detect <mark style=\"background-color: red; color: white;\">P</mark> and <mark style=\"background-color: blue; color: white;\">S</mark> seismic phases along with <span style=\"background-image: linear-gradient(to right, #f12711, #f5af19); \n",
379
+ " -webkit-background-clip: text;\n",
380
+ " -webkit-text-fill-color: transparent;\n",
381
+ " background-clip: text;\n",
382
+ " font-size: 24px;\">\n",
383
+ " uncertainty\n",
384
+ " </span> of the detection.</p>\n",
 
 
 
 
 
 
 
 
 
 
385
  "<ol>\n",
386
  " <li>By selecting one of the sample waveforms.</li>\n",
387
  " <li>By uploading your own waveform.</li>\n",
app.py CHANGED
@@ -22,6 +22,7 @@ from obspy.clients.fdsn.header import URL_MAPPINGS
22
 
23
  import matplotlib.pyplot as plt
24
  import matplotlib.dates as mdates
 
25
 
26
  from glob import glob
27
 
@@ -336,23 +337,13 @@ model.eval()
336
 
337
  with gr.Blocks() as demo:
338
  gr.HTML("""<h1>PhaseHunter</h1>
339
- <p>This app allows one to detect <mark style="background-color: red; color: white;">P</mark> and <mark style="background-color: blue; color: white;">S</mark> seismic phases along with
340
-
341
- <span style="font-size: 24px; font-weight: bold;">
342
- <span style="color: #4c4c4c; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;">u</span>
343
- <span style="color: #808080; text-shadow: 1px 1px 0 #bbb, -1px -1px 0 #bbb, 1px -1px 0 #bbb, -1px 1px 0 #bbb;">n</span>
344
- <span style="color: #b3b3b3; text-shadow: 1px 1px 0 #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;">c</span>
345
- <span style="color: #d9d9d9; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;">e</span>
346
- <span style="color: #f2f2f2; text-shadow: 1px 1px 0 #eee, -1px -1px 0 #eee, 1px -1px 0 #eee, -1px 1px 0 #eee;">r</span>
347
- <span style="color: #d9d9d9; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;">t</span>
348
- <span style="color: #b3b3b3; text-shadow: 1px 1px 0 #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;">a</span>
349
- <span style="color: #808080; text-shadow: 1px 1px 0 #bbb, -1px -1px 0 #bbb, 1px -1px 0 #bbb, -1px 1px 0 #bbb;">i</span>
350
- <span style="color: #4c4c4c; text-shadow: 1px 1px 0 #ccc, -1px -1px 0 #ccc, 1px -1px 0 #ccc, -1px 1px 0 #ccc;">n</span>
351
- <span style="color: #808080; text-shadow: 1px 1px 0 #bbb, -1px -1px 0 #bbb, 1px -1px 0 #bbb, -1px 1px 0 #bbb;">t</span>
352
- <span style="color: #b3b3b3; text-shadow: 1px 1px 0 #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;">y</span>
353
-
354
- </span>
355
- of the detection.</p>
356
  <ol>
357
  <li>By selecting one of the sample waveforms.</li>
358
  <li>By uploading your own waveform.</li>
 
22
 
23
  import matplotlib.pyplot as plt
24
  import matplotlib.dates as mdates
25
+ from matplotlib.colors import LightSource
26
 
27
  from glob import glob
28
 
 
337
 
338
  with gr.Blocks() as demo:
339
  gr.HTML("""<h1>PhaseHunter</h1>
340
+ <p>This app allows one to detect <mark style="background-color: red; color: white;">P</mark> and <mark style="background-color: blue; color: white;">S</mark> seismic phases along with <span style="background-image: linear-gradient(to right, #f12711, #f5af19);
341
+ -webkit-background-clip: text;
342
+ -webkit-text-fill-color: transparent;
343
+ background-clip: text;
344
+ font-size: 24px;">
345
+ uncertainty
346
+ </span> of the detection.</p>
 
 
 
 
 
 
 
 
 
 
347
  <ol>
348
  <li>By selecting one of the sample waveforms.</li>
349
  <li>By uploading your own waveform.</li>