Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import subprocess
|
|
5 |
import os
|
6 |
import requests
|
7 |
import random
|
8 |
-
|
9 |
|
10 |
import shutil
|
11 |
import json
|
@@ -126,7 +126,14 @@ def do_ML_LLAMA(text:str, trycount:int):
|
|
126 |
textarea_element = driver.find_element(By.XPATH,textarea_xpath)
|
127 |
|
128 |
textarea_element.send_keys(text)
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
button_id = 'component-8'
|
131 |
button_element = driver.find_element(By.ID,button_id)
|
132 |
|
@@ -235,6 +242,15 @@ def do_ML_MPT(text:str, trycount:int):
|
|
235 |
textarea_element = driver.find_element(By.XPATH,textarea_xpath)
|
236 |
|
237 |
textarea_element.send_keys(text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
button_id = 'component-9' # Replace 'comonent-7' with the actual ID
|
240 |
button_element = driver.find_element(By.ID,button_id)
|
|
|
5 |
import os
|
6 |
import requests
|
7 |
import random
|
8 |
+
# import undetected_chromedriver as uc
|
9 |
|
10 |
import shutil
|
11 |
import json
|
|
|
126 |
textarea_element = driver.find_element(By.XPATH,textarea_xpath)
|
127 |
|
128 |
textarea_element.send_keys(text)
|
129 |
+
break
|
130 |
+
except:
|
131 |
+
continue
|
132 |
+
while True:
|
133 |
+
if(currtime>starttime+10):
|
134 |
+
return "Requested Could not be proceed"
|
135 |
+
|
136 |
+
try:
|
137 |
button_id = 'component-8'
|
138 |
button_element = driver.find_element(By.ID,button_id)
|
139 |
|
|
|
242 |
textarea_element = driver.find_element(By.XPATH,textarea_xpath)
|
243 |
|
244 |
textarea_element.send_keys(text)
|
245 |
+
break
|
246 |
+
except:
|
247 |
+
continue
|
248 |
+
|
249 |
+
while True:
|
250 |
+
if(currtime>starttime+10):
|
251 |
+
return "Requested Could not be proceed"
|
252 |
+
try:
|
253 |
+
|
254 |
|
255 |
button_id = 'component-9' # Replace 'comonent-7' with the actual ID
|
256 |
button_element = driver.find_element(By.ID,button_id)
|