Spaces:
Runtime error
Runtime error
gradio app url
Browse files- app.py +0 -38
- frontend/.env.example +2 -3
- frontend/svelte.config.js +1 -1
- stablediffusion-infinity/app.py +1 -1
app.py
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
from pathlib import Path
|
3 |
-
import json
|
4 |
-
from flask import Flask, request, jsonify, g
|
5 |
-
from flask_expects_json import expects_json
|
6 |
-
from flask_cors import CORS
|
7 |
-
from PIL import Image
|
8 |
-
from huggingface_hub import Repository
|
9 |
-
from flask_apscheduler import APScheduler
|
10 |
-
import shutil
|
11 |
-
import sqlite3
|
12 |
-
import subprocess
|
13 |
-
from jsonschema import ValidationError
|
14 |
-
|
15 |
-
MODE = os.environ.get('FLASK_ENV', 'production')
|
16 |
-
IS_DEV = MODE == 'development'
|
17 |
-
app = Flask(__name__, static_url_path='/static')
|
18 |
-
app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False
|
19 |
-
|
20 |
-
CORS(app)
|
21 |
-
|
22 |
-
TOKEN = os.environ.get('HUGGING_FACE_HUB_TOKEN')
|
23 |
-
|
24 |
-
@app.route('/')
|
25 |
-
def index():
|
26 |
-
return app.send_static_file('index.html')
|
27 |
-
|
28 |
-
if __name__ == '__main__':
|
29 |
-
# if not IS_DEV:
|
30 |
-
# print("Starting scheduler -- Running Production")
|
31 |
-
# scheduler = APScheduler()
|
32 |
-
# scheduler.add_job(id='Update Dataset Repository',
|
33 |
-
# func=update_repository, trigger='interval', hours=1)
|
34 |
-
# scheduler.start()
|
35 |
-
# else:
|
36 |
-
# print("Not Starting scheduler -- Running Development")
|
37 |
-
app.run(host='0.0.0.0', port=int(
|
38 |
-
os.environ.get('PORT', 7860)), debug=True, use_reloader=IS_DEV)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frontend/.env.example
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
-
PUBLIC_WS_INPAINTING="wss://spaces.huggingface.tech/huggingface-projects/
|
2 |
-
|
3 |
-
PUBLIC_UPLOADS="https://hf.space/embed/huggingface-projects/sd-color-palette-generator/uploads"
|
|
|
1 |
+
PUBLIC_WS_INPAINTING="wss://spaces.huggingface.tech/huggingface-projects/stable-diffusion-multiplayer/gradio/queue/join"
|
2 |
+
PUBLIC_UPLOADS="https://hf.space/embed/huggingface-projects/stable-diffusion-multiplayer/uploads"
|
|
frontend/svelte.config.js
CHANGED
@@ -12,7 +12,7 @@ const config = {
|
|
12 |
],
|
13 |
kit: {
|
14 |
paths: {
|
15 |
-
base: dev ? '' : '/embed/huggingface-projects/stable-diffusion-multiplayer
|
16 |
},
|
17 |
adapter: adapter({
|
18 |
pages: 'build',
|
|
|
12 |
],
|
13 |
kit: {
|
14 |
paths: {
|
15 |
+
base: dev ? '' : '/embed/huggingface-projects/stable-diffusion-multiplayer'
|
16 |
},
|
17 |
adapter: adapter({
|
18 |
pages: 'build',
|
stablediffusion-infinity/app.py
CHANGED
@@ -225,7 +225,7 @@ async def uploads(path: str, response: Response):
|
|
225 |
|
226 |
|
227 |
app = gr.mount_gradio_app(app, blocks, "/gradio",
|
228 |
-
gradio_api_url="http://
|
229 |
|
230 |
app.mount("/", StaticFiles(directory="../static", html=True), name="static")
|
231 |
|
|
|
225 |
|
226 |
|
227 |
app = gr.mount_gradio_app(app, blocks, "/gradio",
|
228 |
+
gradio_api_url="http://0.0.0.0:7860/gradio/")
|
229 |
|
230 |
app.mount("/", StaticFiles(directory="../static", html=True), name="static")
|
231 |
|