mbCrypto commited on
Commit
67f02b8
Β·
1 Parent(s): 2102e5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -101,12 +101,12 @@ def abstractiveSummaryWithPegasus(words):
101
 
102
  # Main logic of the program
103
  def process(uri, mode):
104
- match mode:
105
- case "Youtube":
106
- return YTVideoToText(uri)
107
-
108
- case "Blog":
109
- return postSummaryWithBart(uri)
110
 
111
 
112
  import gradio as gr
 
101
 
102
  # Main logic of the program
103
  def process(uri, mode):
104
+ if mode == "Youtube":
105
+ return YTVideoToText(uri)
106
+ elif mode == "Blog":
107
+ return postSummaryWithBart(uri)
108
+ else:
109
+ raise ValueError("Invalid mode")
110
 
111
 
112
  import gradio as gr