Update app
Browse files
app.py
CHANGED
@@ -7,11 +7,11 @@ app = Flask(__name__)
|
|
7 |
hf_hub_download("TheBloke/phi-2-GGUF", "phi-2.Q8_0.gguf", local_dir="./")
|
8 |
phi = Llama(model_path="./phi-2.Q8_0.gguf", n_ctx=2048, n_gpu_layers=999)
|
9 |
|
10 |
-
app.route("/", methods=["GET"])
|
11 |
def index():
|
12 |
return "<html><body><h1>Use API</h1><p>Use /completion as POST with a prompt in a JSON query.</p></body></html>"
|
13 |
|
14 |
-
@app.route("/
|
15 |
def completion():
|
16 |
prompt = request.json["prompt"]
|
17 |
res = phi(
|
|
|
7 |
hf_hub_download("TheBloke/phi-2-GGUF", "phi-2.Q8_0.gguf", local_dir="./")
|
8 |
phi = Llama(model_path="./phi-2.Q8_0.gguf", n_ctx=2048, n_gpu_layers=999)
|
9 |
|
10 |
+
app.route("/spaces/MrOvkill/phastfi/", methods=["GET"])
|
11 |
def index():
|
12 |
return "<html><body><h1>Use API</h1><p>Use /completion as POST with a prompt in a JSON query.</p></body></html>"
|
13 |
|
14 |
+
@app.route("/spaces/MrOvkill/phastfi/generate", methods=["POST"])
|
15 |
def completion():
|
16 |
prompt = request.json["prompt"]
|
17 |
res = phi(
|