DeathDaDev commited on
Commit
a618bb4
1 Parent(s): d1605a3

Add basic Flask app and index template.

Browse files
Files changed (2) hide show
  1. app.py +10 -0
  2. templates/index.html +20 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, render_template
2
+
3
+ app = Flask(__name__)
4
+
5
+ @app.route("/")
6
+ def index():
7
+ return render_template("index.html")
8
+
9
+ if __name__ == "__main__":
10
+ app.run(host="0.0.0.0", port=5000, debug=True)
templates/index.html ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Ollama Server</title>
5
+ </head>
6
+ <body>
7
+ <h1>Ollama Server Logs</h1>
8
+ <pre>
9
+ {{ logs }}
10
+ </pre>
11
+ <h1>API Endpoints</h1>
12
+ <ul>
13
+ <li><code>/generate</code>: Generate text</li>
14
+ <li><code>/chat</code>: Chat with the model</li>
15
+ <li><code>/translate</code>: Translate text</li>
16
+ <li><code>/summarize</code>: Summarize text</li>
17
+ <li><code>/question</code>: Answer a question</li>
18
+ </ul>
19
+ </body>
20
+ </html>