xyplon
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def get_client_ip():
|
|
15 |
limiter = Limiter(
|
16 |
key_func=get_client_ip,
|
17 |
app=app,
|
18 |
-
default_limits=["
|
19 |
)
|
20 |
|
21 |
|
@@ -34,10 +34,10 @@ def index():
|
|
34 |
|
35 |
@app.route("/users")
|
36 |
def users():
|
37 |
-
return {"total users : " : users}
|
38 |
|
|
|
39 |
@app.route('/gen', methods=['POST'])
|
40 |
-
@limiter.limit("8 per minute")
|
41 |
def Hf():
|
42 |
|
43 |
prompt = request.json.get('prompt', '')
|
@@ -50,7 +50,7 @@ def Hf():
|
|
50 |
style = request.json.get('style', 'Cinematic')
|
51 |
shash = request.json.get('hash', 'Cinematic')
|
52 |
def Gen(prompt,negative,steps,width,height,scale,style,model):
|
53 |
-
req = requests.post('https://xyplon-
|
54 |
'Authorization' : os.getenv('auth')
|
55 |
},json={
|
56 |
'prompt': prompt,
|
|
|
15 |
limiter = Limiter(
|
16 |
key_func=get_client_ip,
|
17 |
app=app,
|
18 |
+
default_limits=["6 per minute"]
|
19 |
)
|
20 |
|
21 |
|
|
|
34 |
|
35 |
@app.route("/users")
|
36 |
def users():
|
37 |
+
return {"total users : " : users}
|
38 |
|
39 |
+
@limiter.limit("6 per minute")
|
40 |
@app.route('/gen', methods=['POST'])
|
|
|
41 |
def Hf():
|
42 |
|
43 |
prompt = request.json.get('prompt', '')
|
|
|
50 |
style = request.json.get('style', 'Cinematic')
|
51 |
shash = request.json.get('hash', 'Cinematic')
|
52 |
def Gen(prompt,negative,steps,width,height,scale,style,model):
|
53 |
+
req = requests.post('https://xyplon-proxy.hf.space/hf/img/gen',headers={
|
54 |
'Authorization' : os.getenv('auth')
|
55 |
},json={
|
56 |
'prompt': prompt,
|