matthoffner commited on
Commit
44cc67b
ยท
1 Parent(s): 86d1042

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +39 -27
main.py CHANGED
@@ -38,34 +38,46 @@ async def demo():
38
  html_content = """
39
  <!DOCTYPE html>
40
  <html>
41
- <head>
42
- <style>
43
- #logs {
44
- background-color: black;
45
- color:white;
46
- height:600px;
47
- overflow-x: hidden;
48
- overflow-y: auto;
49
- text-align: left;
50
- padding-left:10px;
51
- }
52
- </style>
53
- </head>
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
- <body>
56
-
57
- <h1>StoryWriter Demo</h1>
58
- <div id="logs">
59
- </div>
60
-
61
- <script>
62
- var source = new EventSource("https://matthoffner-storywriter.hf.space/stream");
63
- source.onmessage = function(event) {
64
- document.getElementById("logs").innerHTML += event.data
65
- };
66
- </script>
67
-
68
- </body>
69
  </html>
70
  """
71
  return HTMLResponse(content=html_content, status_code=200)
 
38
  html_content = """
39
  <!DOCTYPE html>
40
  <html>
41
+ <head>
42
+ <style>
43
+ body {
44
+ align-items: center;
45
+ background-color: #d9b99b;
46
+ display: flex;
47
+ height: 100vh;
48
+ justify-content: center;
49
+ }
50
+
51
+ #logs {
52
+ align-items: center;
53
+ background-color: #fff0db;
54
+ box-shadow:
55
+ 12px 12px 16px 0 rgba(0, 0, 0, 0.25),
56
+ -8px -8px 12px 0 rgba(255, 255, 255, 0.3);
57
+ border-radius: 50px;
58
+ display: flex;
59
+ height: 200px;
60
+ justify-content: center;
61
+ margin-right: 4rem;
62
+ height:90vh;
63
+ }
64
+ </style>
65
+ </head>
66
 
67
+ <body>
68
+
69
+ <h1>StoryWriter Demo</h1>
70
+ <div id="content">
71
+ </div>
72
+
73
+ <script>
74
+ var source = new EventSource("https://matthoffner-storywriter.hf.space/stream");
75
+ source.onmessage = function(event) {
76
+ document.getElementById("content").innerHTML += event.data
77
+ };
78
+ </script>
79
+
80
+ </body>
81
  </html>
82
  """
83
  return HTMLResponse(content=html_content, status_code=200)