Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,18 +59,13 @@ def get_transcript(youtube_url):
|
|
| 59 |
except Exception as e:
|
| 60 |
print(f"Could not retrieve transcript: {e}")
|
| 61 |
|
| 62 |
-
if __name__ == "__main__":
|
| 63 |
-
# url = input("Enter YouTube video URL: ")
|
| 64 |
-
# url = "https://www.youtube.com/watch?v=1CwHTRGLyjE"
|
| 65 |
-
# summarized_text = get_transcript(url)
|
| 66 |
-
# if summarized_text:
|
| 67 |
-
# print("Summary:\n", summarized_text)
|
| 68 |
-
gr.close_all()
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
|
|
| 59 |
except Exception as e:
|
| 60 |
print(f"Could not retrieve transcript: {e}")
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
gr.close_all()
|
| 64 |
+
|
| 65 |
+
# demo = gr.Interface(fn=summary, inputs="text",outputs="text")
|
| 66 |
+
demo = gr.Interface(fn=get_transcript,
|
| 67 |
+
inputs=[gr.Textbox(label="Input Youtube URL to summarize", lines=1)],
|
| 68 |
+
outputs=[gr.Textbox(label="Summarized text", lines=4)],
|
| 69 |
+
title="@pavan-genai Project 2: Youtube Script Summarizer",
|
| 70 |
+
description="THIS APPLICATION WILL BE USED TO SUMMARIZE THE YOUTUBE VIDEO")
|
| 71 |
+
demo.launch()
|