Spaces:
Sleeping
Sleeping
ffreemt
commited on
Commit
·
2160552
1
Parent(s):
9201e7f
Update
Browse files- duck2api_fwd.py +5 -2
- requirements.txt +2 -1
duck2api_fwd.py
CHANGED
@@ -4,13 +4,16 @@
|
|
4 |
# curl -sS --location http://127.0.0.1:5000/hf/v1/chat/completions -H "Content-Type: application/json" --data "{\"model\": \"gpt-.5-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Say this is a test!\"}], \"stream\": false}"
|
5 |
|
6 |
from threading import Thread
|
|
|
7 |
import requests
|
8 |
from flask import Flask, jsonify, request
|
9 |
-
from ycecream import y
|
10 |
from python_run_cmd import run_cmd
|
|
|
|
|
11 |
|
12 |
def run_duck2api():
|
13 |
-
|
|
|
14 |
|
15 |
Thread(target=run_duck2api).start()
|
16 |
|
|
|
4 |
# curl -sS --location http://127.0.0.1:5000/hf/v1/chat/completions -H "Content-Type: application/json" --data "{\"model\": \"gpt-.5-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Say this is a test!\"}], \"stream\": false}"
|
5 |
|
6 |
from threading import Thread
|
7 |
+
|
8 |
import requests
|
9 |
from flask import Flask, jsonify, request
|
|
|
10 |
from python_run_cmd import run_cmd
|
11 |
+
from ycecream import y
|
12 |
+
|
13 |
|
14 |
def run_duck2api():
|
15 |
+
run_cmd("./duck2api")
|
16 |
+
|
17 |
|
18 |
Thread(target=run_duck2api).start()
|
19 |
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
flask
|
2 |
ycecream
|
3 |
-
requests
|
|
|
|
1 |
flask
|
2 |
ycecream
|
3 |
+
requests
|
4 |
+
python-run-cmd
|