initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from flask import Flask, render_template
|
||||
import inbox
|
||||
from assistant import process
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/emails")
|
||||
def emails():
|
||||
return inbox.fetch_emails()
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
instructions = """
|
||||
You are a helpfull assistant. Your job is to go to all the emails and provide a short summary of all emails
|
||||
in the inbox. Then go through all emails and suggest what is most important to do next and explain your
|
||||
decision. Write your answer in German.
|
||||
"""
|
||||
answer = process(instructions=instructions)
|
||||
return render_template("index.html", answer=answer,messages=inbox.fetch_emails())
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True, host="0.0.0.0", port=5003)
|
||||
Reference in New Issue
Block a user