Spaces:
Paused
Paused
matthoffner
commited on
Commit
·
6218ec6
1
Parent(s):
49b7702
Update main.py
Browse files
main.py
CHANGED
@@ -41,12 +41,28 @@ async def demo():
|
|
41 |
<!DOCTYPE html>
|
42 |
<html>
|
43 |
<body>
|
44 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
46 |
<script>
|
47 |
var source = new EventSource("https://matthoffner-starchat-alpha.hf.space/stream");
|
48 |
source.onmessage = function(event) {
|
49 |
-
|
50 |
};
|
51 |
</script>
|
52 |
|
|
|
41 |
<!DOCTYPE html>
|
42 |
<html>
|
43 |
<body>
|
44 |
+
<style>
|
45 |
+
.content {
|
46 |
+
box-sizing: border-box;
|
47 |
+
min-width: 200px;
|
48 |
+
max-width: 980px;
|
49 |
+
margin: 0 auto;
|
50 |
+
padding: 45px;
|
51 |
+
}
|
52 |
+
|
53 |
+
@media (max-width: 767px) {
|
54 |
+
.content {
|
55 |
+
padding: 15px;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
</style>
|
59 |
+
<article id="content"></article>
|
60 |
+
|
61 |
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
62 |
<script>
|
63 |
var source = new EventSource("https://matthoffner-starchat-alpha.hf.space/stream");
|
64 |
source.onmessage = function(event) {
|
65 |
+
document.getElementById("content").innerHTML += event.data
|
66 |
};
|
67 |
</script>
|
68 |
|