Farid Karimli commited on
Commit
a1d0fed
·
unverified ·
2 Parent(s): d474308 9453708

Merge pull request #4 from tools4ds/retargeting

Browse files

Add logos, deployment and unauthorized page change

.github/workflows/deploy_to_hf.yml CHANGED
@@ -2,7 +2,7 @@ name: Push Production to HuggingFace
2
 
3
  on:
4
  push:
5
- branches: [main, retargeting]
6
 
7
  # run this workflow manualy from the Actions tab
8
  workflow_dispatch:
 
2
 
3
  on:
4
  push:
5
+ branches: [main]
6
 
7
  # run this workflow manualy from the Actions tab
8
  workflow_dispatch:
.gitignore CHANGED
@@ -11,5 +11,4 @@
11
  **/.files/*
12
  .env
13
  *.pyc
14
- venv/
15
- apps
 
11
  **/.files/*
12
  .env
13
  *.pyc
14
+ venv/
 
apps/ai_tutor/app.py CHANGED
@@ -390,8 +390,9 @@ mount_chainlit(app=app, target="chainlit_app.py", path=CHAINLIT_PATH)
390
  if __name__ == "__main__":
391
  parser = argparse.ArgumentParser(description="Run the AI Tutor application")
392
  parser.add_argument("--host", default="0.0.0.0", help="Host to run the server on")
393
- parser.add_argument("--port", type=int, default=7860,
394
- help="Port to run the server on")
 
395
  args = parser.parse_args()
396
 
397
  uvicorn.run(app, host=args.host, port=args.port)
 
390
  if __name__ == "__main__":
391
  parser = argparse.ArgumentParser(description="Run the AI Tutor application")
392
  parser.add_argument("--host", default="0.0.0.0", help="Host to run the server on")
393
+ parser.add_argument(
394
+ "--port", type=int, default=7860, help="Port to run the server on"
395
+ )
396
  args = parser.parse_args()
397
 
398
  uvicorn.run(app, host=args.host, port=args.port)
apps/ai_tutor/public/assets/images/avatars/logo.png ADDED
apps/ai_tutor/public/logo_dark.png CHANGED
apps/ai_tutor/public/logo_light.png CHANGED
apps/ai_tutor/templates/unauthorized.html CHANGED
@@ -1,94 +1,100 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Access Restricted</title>
7
  <style>
8
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
9
 
10
- body, html {
11
- margin: 0;
12
- padding: 0;
13
- font-family: 'Inter', sans-serif;
14
- background-color: #f7f7f7; /* Light gray background */
15
- background-image: url('https://www.transparenttextures.com/patterns/cubes.png'); /* Subtle geometric pattern */
16
- background-repeat: repeat;
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- height: 100vh;
21
- color: #333;
22
- }
 
23
 
24
- .container {
25
- background: rgba(255, 255, 255, 0.9);
26
- border: 1px solid #ddd;
27
- border-radius: 8px;
28
- width: 100%;
29
- max-width: 400px;
30
- padding: 50px;
31
- box-sizing: border-box;
32
- text-align: center;
33
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
34
- backdrop-filter: blur(10px);
35
- -webkit-backdrop-filter: blur(10px);
36
- }
37
 
38
- .avatar {
39
- width: 90px;
40
- height: 90px;
41
- border-radius: 50%;
42
- margin-bottom: 25px;
43
- border: 2px solid #ddd;
44
- }
45
 
46
- .container h1 {
47
- margin-bottom: 20px;
48
- font-size: 26px;
49
- font-weight: 600;
50
- color: #1a1a1a;
51
- }
52
 
53
- .container p {
54
- font-size: 18px;
55
- color: #4a4a4a;
56
- margin-bottom: 35px;
57
- line-height: 1.5;
58
- }
59
 
60
- .button {
61
- padding: 14px 0;
62
- margin: 12px 0;
63
- font-size: 16px;
64
- border-radius: 6px;
65
- cursor: pointer;
66
- width: 100%;
67
- border: 1px solid #ccc;
68
- background-color: #007BFF;
69
- color: #fff;
70
- transition: background-color 0.3s ease, border-color 0.3s ease;
71
- }
72
 
73
- .button:hover {
74
- background-color: #0056b3;
75
- border-color: #0056b3;
76
- }
77
  </style>
78
- </head>
79
- <body>
80
  <div class="container">
81
- <img src="/public/assets/images/avatars/ai-tutor.png" alt="AI Tutor Avatar" class="avatar">
82
- <h1>Access Restricted</h1>
83
- <p>
84
- We're currently testing things out for the <strong>DS598</strong> course.
85
- Access is restricted to students of the course. If you're enrolled in <strong>DS598</strong> and seeing this message,
86
- please reach out to us, and we'll help you get access.<br><br>
87
- <em>P.S. Don't forget to use your BU email when logging in!</em>
88
- </p>
89
- <form action="/" method="get">
90
- <button type="submit" class="button">Return to Home</button>
91
- </form>
 
 
 
 
 
92
  </div>
93
- </body>
94
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>Access Restricted</title>
7
  <style>
8
+ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
9
 
10
+ body,
11
+ html {
12
+ margin: 0;
13
+ padding: 0;
14
+ font-family: "Inter", sans-serif;
15
+ background-color: #f7f7f7; /* Light gray background */
16
+ background-image: url("https://www.transparenttextures.com/patterns/cubes.png"); /* Subtle geometric pattern */
17
+ background-repeat: repeat;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ height: 100vh;
22
+ color: #333;
23
+ }
24
 
25
+ .container {
26
+ background: rgba(255, 255, 255, 0.9);
27
+ border: 1px solid #ddd;
28
+ border-radius: 8px;
29
+ width: 100%;
30
+ max-width: 400px;
31
+ padding: 50px;
32
+ box-sizing: border-box;
33
+ text-align: center;
34
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
35
+ backdrop-filter: blur(10px);
36
+ -webkit-backdrop-filter: blur(10px);
37
+ }
38
 
39
+ .avatar {
40
+ width: 90px;
41
+ height: 90px;
42
+ border-radius: 50%;
43
+ margin-bottom: 25px;
44
+ border: 2px solid #ddd;
45
+ }
46
 
47
+ .container h1 {
48
+ margin-bottom: 20px;
49
+ font-size: 26px;
50
+ font-weight: 600;
51
+ color: #1a1a1a;
52
+ }
53
 
54
+ .container p {
55
+ font-size: 18px;
56
+ color: #4a4a4a;
57
+ margin-bottom: 35px;
58
+ line-height: 1.5;
59
+ }
60
 
61
+ .button {
62
+ padding: 14px 0;
63
+ margin: 12px 0;
64
+ font-size: 16px;
65
+ border-radius: 6px;
66
+ cursor: pointer;
67
+ width: 100%;
68
+ border: 1px solid #ccc;
69
+ background-color: #007bff;
70
+ color: #fff;
71
+ transition: background-color 0.3s ease, border-color 0.3s ease;
72
+ }
73
 
74
+ .button:hover {
75
+ background-color: #0056b3;
76
+ border-color: #0056b3;
77
+ }
78
  </style>
79
+ </head>
80
+ <body>
81
  <div class="container">
82
+ <img
83
+ src="/public/assets/images/avatars/ai-tutor.png"
84
+ alt="AI Tutor Avatar"
85
+ class="avatar"
86
+ />
87
+ <h1>Access Restricted</h1>
88
+ <p>
89
+ We're currently testing things out for the
90
+ <strong>DS701</strong> course. Access is restricted to students of the
91
+ course. If you're enrolled in <strong>DS701</strong> and seeing this
92
+ message, please reach out to us, and we'll help you get access.<br /><br />
93
+ <em>P.S. Don't forget to use your BU email when logging in!</em>
94
+ </p>
95
+ <form action="/" method="get">
96
+ <button type="submit" class="button">Return to Home</button>
97
+ </form>
98
  </div>
99
+ </body>
100
  </html>