Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,8 @@ import bs4
|
|
| 3 |
import gradio as gr
|
| 4 |
from bs4 import BeautifulSoup
|
| 5 |
|
| 6 |
-
def run_lora(prompt):
|
| 7 |
-
page = requests.get("https://www.google.dz/search?q="+prompt)
|
| 8 |
soup = BeautifulSoup(page.content)
|
| 9 |
import re
|
| 10 |
links = soup.findAll("a")
|
|
@@ -37,7 +37,7 @@ with gr.Blocks() as app:
|
|
| 37 |
translated_textbox = gr.Textbox(lines=5, placeholder="", label="Result Text")
|
| 38 |
info_label = gr.HTML("")
|
| 39 |
btn = gr.Button("GetNow")
|
| 40 |
-
btn.click(run_lora, inputs=[
|
| 41 |
|
| 42 |
app.queue()
|
| 43 |
app.launch()
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
from bs4 import BeautifulSoup
|
| 5 |
|
| 6 |
+
def run_lora(prompt,site):
|
| 7 |
+
page = requests.get("https://www.google.dz/search?q=site:" +site + " " +prompt)
|
| 8 |
soup = BeautifulSoup(page.content)
|
| 9 |
import re
|
| 10 |
links = soup.findAll("a")
|
|
|
|
| 37 |
translated_textbox = gr.Textbox(lines=5, placeholder="", label="Result Text")
|
| 38 |
info_label = gr.HTML("")
|
| 39 |
btn = gr.Button("GetNow")
|
| 40 |
+
btn.click(run_lora, inputs=[input_textbox,input_sitebox],outputs=[translated_textbox])
|
| 41 |
|
| 42 |
app.queue()
|
| 43 |
app.launch()
|