Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,20 +2,20 @@ import requests
|
|
2 |
import bs4
|
3 |
import gradio as gr
|
4 |
from bs4 import BeautifulSoup
|
|
|
5 |
|
6 |
def run_lora(prompt,site,start,end):
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
for
|
16 |
-
|
17 |
-
|
18 |
-
return mLink
|
19 |
|
20 |
with gr.Blocks() as app:
|
21 |
gr.HTML("""<html>
|
|
|
2 |
import bs4
|
3 |
import gradio as gr
|
4 |
from bs4 import BeautifulSoup
|
5 |
+
from googlesearch import search
|
6 |
|
7 |
def run_lora(prompt,site,start,end):
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
# to search
|
13 |
+
query = "https://www.google.com/search?q=inurl:" +site + " " +prompt + "&tbs=cdr%3A1%2Ccd_min%3A"+start+"%2Ccd_max%3A" + end
|
14 |
+
|
15 |
+
links = []
|
16 |
+
for j in search(query, tld="co.in", num=10, stop=10, pause=2):
|
17 |
+
links.append(j)
|
18 |
+
return links
|
|
|
19 |
|
20 |
with gr.Blocks() as app:
|
21 |
gr.HTML("""<html>
|