NitinBot002 commited on
Commit
bd86503
·
1 Parent(s): 0c550fd

first commit

Browse files
.env CHANGED
@@ -12,4 +12,4 @@ SUPABASE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZ
12
 
13
  # API authentication key for this server
14
  ADMIN_API_KEY=""
15
- BASE_URL="https://nitinbot001-tg-storage.hf.space"
 
12
 
13
  # API authentication key for this server
14
  ADMIN_API_KEY=""
15
+ # BASE_URL="http://localhost:7860"
__pycache__/db.cpython-310.pyc ADDED
Binary file (3.58 kB). View file
 
__pycache__/main.cpython-310.pyc ADDED
Binary file (8.74 kB). View file
 
__pycache__/tg.cpython-310.pyc ADDED
Binary file (7.73 kB). View file
 
frontend.html CHANGED
@@ -471,7 +471,7 @@
471
  <div class="config-bar">
472
  <div class="field">
473
  <label>API BASE URL</label>
474
- <input id="baseUrl" type="text" value="http://localhost:8082" placeholder="http://localhost:8082" />
475
  </div>
476
  <div class="field-key">
477
  <label>X-API-KEY</label>
@@ -556,7 +556,7 @@ const $ = id => document.getElementById(id);
556
 
557
  function cfg() {
558
  return {
559
- base: ($('baseUrl').value || 'http://localhost:8082').replace(/\/$/, ''),
560
  key: $('apiKey').value,
561
  };
562
  }
 
471
  <div class="config-bar">
472
  <div class="field">
473
  <label>API BASE URL</label>
474
+ <input id="baseUrl" type="text" value="http://localhost:7860" placeholder="http://localhost:7860" />
475
  </div>
476
  <div class="field-key">
477
  <label>X-API-KEY</label>
 
556
 
557
  function cfg() {
558
  return {
559
+ base: ($('baseUrl').value || 'https://nitinbot001-tg-storage.hf.space').replace(/\/$/, ''),
560
  key: $('apiKey').value,
561
  };
562
  }
main.py CHANGED
@@ -47,7 +47,7 @@ app = Flask(__name__)
47
  CORS(app)
48
 
49
  ADMIN_API_KEY = os.getenv("ADMIN_API_KEY", "changeme")
50
- BASE_URL = os.getenv("BASE_URL", "http://localhost:8082").rstrip("/")
51
 
52
  _HERE = Path(__file__).parent
53
  FRONTEND_PATH = _HERE / "frontend.html"
 
47
  CORS(app)
48
 
49
  ADMIN_API_KEY = os.getenv("ADMIN_API_KEY", "changeme")
50
+ BASE_URL = os.getenv("BASE_URL", "https://nitinbot001-tg-storage.hf.space").rstrip("/")
51
 
52
  _HERE = Path(__file__).parent
53
  FRONTEND_PATH = _HERE / "frontend.html"
server.py CHANGED
@@ -14,6 +14,6 @@ from main import app
14
  if __name__ == "__main__":
15
  app.run(
16
  host="0.0.0.0",
17
- port=8082,
18
  debug=True,
19
  )
 
14
  if __name__ == "__main__":
15
  app.run(
16
  host="0.0.0.0",
17
+ port=7860,
18
  debug=True,
19
  )