Putting up on mule, apache2 mod_wsgi
This commit is contained in:
parent
e7b0d09b46
commit
038843861b
0
__init__.py
Normal file
0
__init__.py
Normal file
8
buzzfeed-haiku-generator.wsgi
Executable file
8
buzzfeed-haiku-generator.wsgi
Executable file
@ -0,0 +1,8 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.append('/var/www/buzzfeed-haiku-generator')
|
||||
|
||||
import logging
|
||||
logging.basicConfig(stream=sys.stderr)
|
||||
|
||||
from app import app as application
|
@ -32,7 +32,7 @@ class PoemGenerator():
|
||||
self.words = []
|
||||
self.all_words = []
|
||||
self.inflect_engine = inflect.engine()
|
||||
with open('buzzfeed_facebook_statuses.csv', newline='') as statuses:
|
||||
with open('/var/www/buzzfeed-haiku-generator/buzzfeed_facebook_statuses.csv', newline='', encoding='utf-8') as statuses:
|
||||
reader = csv.reader(statuses, delimiter=',')
|
||||
for row in reader:
|
||||
if 'via buzzfeed ' not in row[1].lower(): # only English
|
||||
|
@ -1,10 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Buzzfeed Haiku Generator</title>
|
||||
<title>BuzzFeed Haiku Generator</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
text-align: center;
|
||||
}
|
||||
div.haiku pre {
|
||||
font-size: large;
|
||||
}
|
||||
div.footer {
|
||||
font-size: small;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Buzzfeed Haiku Generator</h1>
|
||||
<h2>BuzzFeed Haiku Generator</h2>
|
||||
<div class="haiku">
|
||||
<pre>{{haiku}}</pre>
|
||||
<form action="">
|
||||
|
Loading…
Reference in New Issue
Block a user