-
Notifications
You must be signed in to change notification settings - Fork 4
/
frontEnd.py
52 lines (37 loc) · 1.06 KB
/
frontEnd.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/python
import cgi, cgitb
tweet=""
file = open('tweets.txt', 'r')
text = file.read()
file.close()
tweet=text
print(text)
print ("Content-type:text/html\r\n\r\n")
print ("""
<!DOCTYPE html>
<html>
<head>
<title>Sentiment Analysys</title>
</head>
<body style="background-color:#4ab3f4">
<div id="header-image" style="position:absolute;top:0">
<img src="twitter.png">
</div>
<div id="bar-graph" style="position:absolute;top:10vw;left:0.6vw;">
<img src="bar.png" height=500px>
</div>
<div id="pie-graph" style="position:absolute;top:10vw;right:12vw;">
<img src="pie.png" height=500px>
</div>
<div id="hashtag" style="position:fixed;top:60%;left:40%; transform: translateX(-50%) translateY(-50%);height: 100px;width: 500px;">
<img src="Hashtag Bar Graph.png" height=500px>
</div>
<div id="tweet" style="position:fixed;top:25%;left:45%; transform: translateX(-50%) translateY(-50%);height: 100px;width: 500px;">
<strong>
<span style="text-decoration: underline;">Some random tweets: </span> <br><br>
""")
print(tweet)
print("""</strong></div>
</body>
</html>
""")