Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -183,19 +183,31 @@ def summarize_url(url):
|
|
| 183 |
# demo.launch()
|
| 184 |
|
| 185 |
|
| 186 |
-
with gr as demo:
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
|
|
|
|
|
|
|
| 199 |
|
| 200 |
-
if __name__ == "__main__":
|
| 201 |
-
demo.launch()
|
|
|
|
| 183 |
# demo.launch()
|
| 184 |
|
| 185 |
|
| 186 |
+
# with gr as demo:
|
| 187 |
+
# # Define Gradio interface
|
| 188 |
+
# demo = demo.Interface(
|
| 189 |
+
# fn=summarize_url,
|
| 190 |
+
# inputs="text",
|
| 191 |
+
# outputs="text",
|
| 192 |
+
# title="Website Summary Generator",
|
| 193 |
+
# description="Enter a URL to get a one-word topic summary of the website content."
|
| 194 |
+
# )
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
# if __name__ == "__main__":
|
| 198 |
+
# demo.launch()
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
# Create a Gradio interface
|
| 203 |
+
iface = gr.Interface(
|
| 204 |
+
fn=summarize_url,
|
| 205 |
+
inputs="text",
|
| 206 |
+
outputs="text",
|
| 207 |
+
title="Website Summary Generator",
|
| 208 |
+
description="Enter a URL to get a one-word topic summary of the website content."
|
| 209 |
+
)
|
| 210 |
|
| 211 |
+
# Launch the interface
|
| 212 |
+
iface.launch()
|
| 213 |
|
|
|
|
|
|