Spaces:
Build error
Build error
Update main.py
Browse files
main.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
|
2 |
'''
|
3 |
import os
|
4 |
session_token = os.environ.get('SessionToken')
|
5 |
conversation_id = os.environ.get('conversation_id')
|
6 |
from revChatGPT.ChatGPT import Chatbot
|
7 |
chatbot = Chatbot({"session_token": session_token}) # You can start a custom conversation
|
8 |
-
|
9 |
|
10 |
import undetected_chromedriver.v2 as uc
|
11 |
from selenium.webdriver.support import expected_conditions as EC
|
@@ -44,7 +44,11 @@ def run():
|
|
44 |
else:
|
45 |
print("Cloudflare defeated us :(, No woory we will try again. ")
|
46 |
driver.quit()
|
47 |
-
|
48 |
|
49 |
if __name__ == "__main__":
|
50 |
-
run()
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
'''
|
3 |
import os
|
4 |
session_token = os.environ.get('SessionToken')
|
5 |
conversation_id = os.environ.get('conversation_id')
|
6 |
from revChatGPT.ChatGPT import Chatbot
|
7 |
chatbot = Chatbot({"session_token": session_token}) # You can start a custom conversation
|
8 |
+
|
9 |
|
10 |
import undetected_chromedriver.v2 as uc
|
11 |
from selenium.webdriver.support import expected_conditions as EC
|
|
|
44 |
else:
|
45 |
print("Cloudflare defeated us :(, No woory we will try again. ")
|
46 |
driver.quit()
|
47 |
+
'''
|
48 |
|
49 |
if __name__ == "__main__":
|
50 |
+
#run()
|
51 |
+
headers = {'Authorization': 'yusin'}
|
52 |
+
data = {"content": 'am I stupid'}
|
53 |
+
response = requests.post('http://93.56.204.222:7788/api/ask', headers=headers, json=data)
|
54 |
+
print('this is my answear', response.text)
|