adpro commited on
Commit
2997260
·
verified ·
1 Parent(s): 9a196d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -4,7 +4,8 @@ import gradio as gr
4
  from bs4 import BeautifulSoup
5
 
6
  def run_lora(prompt,site,start,end):
7
- page = requests.get("https://www.google.dz/search?q=inurl:" +site + " " +prompt + "&tbs=cdr%3A1%2Ccd_min%3A"+str(start)+"%2Ccd_max%3A" +str( end))
 
8
  soup = BeautifulSoup(page.content)
9
  import re
10
  links = soup.findAll("a")
@@ -32,8 +33,8 @@ with gr.Blocks() as app:
32
 
33
  input_textbox = gr.Textbox(lines=5, placeholder="Enter key", label="Input Text")
34
  input_sitebox = gr.Textbox(lines=5, placeholder="Enter site", label="Site Text")
35
- start = gr.Textbox(lines=5, placeholder="Enter start", label="Site Text")
36
- end = gr.Textbox(lines=5, placeholder="Enter End", label="Site Text")
37
  with gr.Column():
38
 
39
  translated_textbox = gr.Textbox(lines=5, placeholder="", label="Result Text")
 
4
  from bs4 import BeautifulSoup
5
 
6
  def run_lora(prompt,site,start,end):
7
+ page = requests.get("https://www.google.dz/search?q=inurl:" +site + " " +prompt + "&tbs=cdr%3A1%2Ccd_min%3A"+start+"%2Ccd_max%3A" + end)
8
+ print("https://www.google.dz/search?q=inurl:" +site + " " +prompt + "&tbs=cdr%3A1%2Ccd_min%3A"+start+"%2Ccd_max%3A" + end)
9
  soup = BeautifulSoup(page.content)
10
  import re
11
  links = soup.findAll("a")
 
33
 
34
  input_textbox = gr.Textbox(lines=5, placeholder="Enter key", label="Input Text")
35
  input_sitebox = gr.Textbox(lines=5, placeholder="Enter site", label="Site Text")
36
+ start = gr.Textbox(lines=5, placeholder="Enter start", label="Enter start")
37
+ end = gr.Textbox(lines=5, placeholder="Enter End", label="Enter End")
38
  with gr.Column():
39
 
40
  translated_textbox = gr.Textbox(lines=5, placeholder="", label="Result Text")