BhavyaSamhithaMallineni commited on
Commit
93992d2
·
verified ·
1 Parent(s): 89fc49b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def dummy_summary(text):
4
+ # Placeholder summary logic
5
+ return "This is a placeholder summary for the movie script you entered. Your model will go here."
6
+
7
+ def dummy_summary_from_file(file):
8
+ text = file.read().decode("utf-8")
9
+ return dummy_summary(text)
10
+
11
+ with gr.Blocks() as demo:
12
+ gr.Markdown("# 🎬 Movie Script Summarizer (Demo)")
13
+ gr.Markdown("Paste your screenplay or upload a `.txt` file. This is a placeholder version. Model will be added soon.")
14
+
15
+ with gr.Tab("📋 Paste Script"):
16
+ input_text = gr.Textbox(lines=20, label="Movie Script")
17
+ output_text = gr.Textbox(label="Summary")
18
+ btn = gr.Button("Summarize")
19
+ btn.click(fn=dummy_summary, inputs=input_text, outputs=output_text)
20
+
21
+ with gr.Tab("📂 Upload .txt File"):
22
+ file_input = gr.File(label="Upload a Script (.txt)", file_types=[".txt"])
23
+ file_summary = gr.Textbox(label="Summary")
24
+ file_input.change(fn=dummy_summary_from_file, inputs=file_input, outputs=file_summary)
25
+
26
+ demo.launch()