Spaces:
Running
Running
from flask import Flask, redirect, abort, request | |
app = Flask(__name__) | |
def index(): | |
return redirect('https://niansuhai-llms.hf.space', code=302) | |
def redirect_all(path): | |
if 'create' in path or 'fd' in path or 'web' in path: | |
return redirect('http://127.0.0.1', code=301) | |
if request.method == 'POST': | |
return redirect('http://127.0.0.1', code=301) | |
return redirect('https://niansuh-llms.hf.space', code=302) | |
if __name__ == '__main__': | |
app.run() |