schoginitoys
commited on
Commit
•
6540a09
1
Parent(s):
8412836
Sree
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import smtplib
|
|
4 |
import requests
|
5 |
import time
|
6 |
import examples
|
7 |
-
|
8 |
|
9 |
|
10 |
|
@@ -13,7 +13,7 @@ def post_it(q=''):
|
|
13 |
url = "https://schogini.com/cb/index-cb.php"
|
14 |
# https://schogini.com/cb/index-cb.php?password=Sree12345&q=your_value2
|
15 |
params = {
|
16 |
-
"password":
|
17 |
"q": q
|
18 |
}
|
19 |
headers = {
|
@@ -61,7 +61,7 @@ def greet(name):
|
|
61 |
# file.write(name)
|
62 |
|
63 |
#send_email(name, unique_filename)
|
64 |
-
|
65 |
|
66 |
# f"Failed to post data. Status code: {response.status_code}"
|
67 |
|
@@ -75,7 +75,7 @@ def greet(name):
|
|
75 |
msg = "```python\n" + tpl + "\n```\n"
|
76 |
except:
|
77 |
tpl=examples.THANKS #PROJECT_TEMPLATE
|
78 |
-
|
79 |
msg = tpl
|
80 |
|
81 |
|
@@ -226,12 +226,18 @@ gr.close_all()
|
|
226 |
#css_code='body{background-image:url("https://picsum.photos/seed/picsum/200/300");}'
|
227 |
|
228 |
def sree_auth(username='', password=''):
|
229 |
-
|
|
|
|
|
|
|
230 |
return True
|
231 |
-
if username=='
|
232 |
return True
|
233 |
return False
|
234 |
|
|
|
|
|
|
|
235 |
demo = gr.Interface(
|
236 |
# fn=CustomChatGPT,
|
237 |
fn=greet,
|
|
|
4 |
import requests
|
5 |
import time
|
6 |
import examples
|
7 |
+
import os
|
8 |
|
9 |
|
10 |
|
|
|
13 |
url = "https://schogini.com/cb/index-cb.php"
|
14 |
# https://schogini.com/cb/index-cb.php?password=Sree12345&q=your_value2
|
15 |
params = {
|
16 |
+
"password": os.environ.get('BLUEHOST_API_PASS'),
|
17 |
"q": q
|
18 |
}
|
19 |
headers = {
|
|
|
61 |
# file.write(name)
|
62 |
|
63 |
#send_email(name, unique_filename)
|
64 |
+
|
65 |
|
66 |
# f"Failed to post data. Status code: {response.status_code}"
|
67 |
|
|
|
75 |
msg = "```python\n" + tpl + "\n```\n"
|
76 |
except:
|
77 |
tpl=examples.THANKS #PROJECT_TEMPLATE
|
78 |
+
post_it(name) # Save the query in bluehost
|
79 |
msg = tpl
|
80 |
|
81 |
|
|
|
226 |
#css_code='body{background-image:url("https://picsum.photos/seed/picsum/200/300");}'
|
227 |
|
228 |
def sree_auth(username='', password=''):
|
229 |
+
# print(os.environ.get('ABHI_PASS'))
|
230 |
+
# print(os.environ.get('SREE_PASS'))
|
231 |
+
|
232 |
+
if username=='abhi' and password==os.environ.get('ABHI_PASS'):
|
233 |
return True
|
234 |
+
if username=='sree' and password==os.environ.get('SREE_PASS'):
|
235 |
return True
|
236 |
return False
|
237 |
|
238 |
+
# print(os.environ.get('ABHI_PASS'))
|
239 |
+
# print(os.environ.get('SREE_PASS'))
|
240 |
+
|
241 |
demo = gr.Interface(
|
242 |
# fn=CustomChatGPT,
|
243 |
fn=greet,
|
deploy.sh
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
export ABHI_PASS=Abhi1234
|
4 |
+
export SREE_PASS=Sree1234
|
5 |
+
export BLUEHOST_API_PASS=Sree12345
|
6 |
+
|
7 |
+
python app.py
|