Spaces:
Runtime error
Runtime error
Update app.py
#2
by
CognitiveScience
- opened
app.py
CHANGED
|
@@ -1,17 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from bs4 import BeautifulSoup
|
| 3 |
-
import requests
|
| 4 |
|
|
|
|
| 5 |
|
| 6 |
-
def bcs(inp):
|
| 7 |
|
| 8 |
-
|
| 9 |
-
soup = BeautifulSoup(response.text, "html.parser")
|
| 10 |
-
|
| 11 |
-
bcsresult=response.text[response.text.find("viewCount"):].split('"')[2]
|
| 12 |
-
|
| 13 |
-
return bcsresult #soup.prettify()
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
iface = gr.Interface(fn=bcs, inputs="text", outputs="text")
|
| 17 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
from ccogsphere import ccs
|
| 4 |
|
|
|
|
| 5 |
|
| 6 |
+
iface = gr.Interface(fn=ccs, inputs="text", outputs="text")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
iface.launch()
|