Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,14 +32,21 @@ chain = load_summarize_chain(llm, chain_type="stuff")
|
|
32 |
|
33 |
url=st.text_input("Enter webiste URL to summarize (format: https://www.usinoip.com):")
|
34 |
#loader = WebBaseLoader("https://www.usinoip.com/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
try:
|
37 |
-
loader = WebBaseLoader(url)
|
38 |
-
with st.spinner("AI Thinking...Please wait a while to Cheers!"):
|
39 |
-
docs = loader.load()
|
40 |
-
result=chain.run(docs)
|
41 |
-
print(result)
|
42 |
-
st.write("AI Summarization:")
|
43 |
-
st.write(result)
|
44 |
-
except Exception as e:
|
45 |
-
st.write("Wrong URL")
|
|
|
32 |
|
33 |
url=st.text_input("Enter webiste URL to summarize (format: https://www.usinoip.com):")
|
34 |
#loader = WebBaseLoader("https://www.usinoip.com/")
|
35 |
+
loader = WebBaseLoader(url)
|
36 |
+
with st.spinner("AI Thinking...Please wait a while to Cheers!"):
|
37 |
+
docs = loader.load()
|
38 |
+
result=chain.run(docs)
|
39 |
+
print(result)
|
40 |
+
st.write("AI Summarization:")
|
41 |
+
st.write(result)
|
42 |
|
43 |
+
#try:
|
44 |
+
# loader = WebBaseLoader(url)
|
45 |
+
# with st.spinner("AI Thinking...Please wait a while to Cheers!"):
|
46 |
+
# docs = loader.load()
|
47 |
+
# result=chain.run(docs)
|
48 |
+
# print(result)
|
49 |
+
# st.write("AI Summarization:")
|
50 |
+
# st.write(result)
|
51 |
+
#except Exception as e:
|
52 |
+
# st.write("Wrong URL")
|