umarmajeedofficial commited on
Commit
c822289
·
verified ·
1 Parent(s): a5cb220

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -98,12 +98,17 @@ def save_responses_to_pdf(responses, output_pdf_path):
98
  )
99
 
100
  content = []
 
 
 
 
 
101
  for index, response in enumerate(responses, start=1):
102
  # Add the response number and content
103
- heading = Paragraph(f"<b>File {index}:</b>", styles['Heading2'])
104
  response_text = Paragraph(response.replace("\n", "<br/>"), response_style)
105
 
106
- content.append(heading)
107
  content.append(Spacer(1, 6)) # Space between heading and response
108
  content.append(response_text)
109
  content.append(Spacer(1, 18)) # Space between responses
@@ -132,10 +137,12 @@ def process_files(audio_files, pdf_file):
132
  interface = gr.Interface(
133
  fn=process_files,
134
  inputs=[
135
- gr.Files(label="Upload Audio Files", type="filepath"),
136
- gr.File(label="Upload PDF File", type="filepath")
137
  ],
138
- outputs=gr.File(label="Download Output PDF")
 
 
139
  )
140
 
141
  # Launch the interface
 
98
  )
99
 
100
  content = []
101
+ # Add heading
102
+ heading = Paragraph("<b>FillUp by Umar Majeed</b>", styles['Title'])
103
+ content.append(heading)
104
+ content.append(Spacer(1, 12))
105
+
106
  for index, response in enumerate(responses, start=1):
107
  # Add the response number and content
108
+ file_heading = Paragraph(f"<b>File {index}:</b>", styles['Heading2'])
109
  response_text = Paragraph(response.replace("\n", "<br/>"), response_style)
110
 
111
+ content.append(file_heading)
112
  content.append(Spacer(1, 6)) # Space between heading and response
113
  content.append(response_text)
114
  content.append(Spacer(1, 18)) # Space between responses
 
137
  interface = gr.Interface(
138
  fn=process_files,
139
  inputs=[
140
+ gr.Files(label="Upload Audio Files", type="file"),
141
+ gr.File(label="Upload PDF File", type="file")
142
  ],
143
+ outputs=gr.File(label="Download Output PDF"),
144
+ title="FillUp by Umar Majeed",
145
+ description="Upload audio files and a PDF file. The application will transcribe the audio, extract questions from the PDF, and generate a response PDF."
146
  )
147
 
148
  # Launch the interface