barghavani commited on
Commit
e249cd1
·
verified ·
1 Parent(s): bcad65d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -97,8 +97,8 @@ def on_file_upload(filename, file_content):
97
 
98
  def main():
99
  input_api_key = Textbox(label="Enter your OpenAI API Key")
100
- # Specify the type as 'file' to ensure a file-like object is passed to your function
101
- input_pdf_file = File(label="Upload your PDF resume", type="file")
102
  output_yaml = Textbox(label="Formatted Resume in YAML")
103
 
104
  iface = gr.Interface(
@@ -114,3 +114,4 @@ def main():
114
  if __name__ == "__main__":
115
  main()
116
 
 
 
97
 
98
  def main():
99
  input_api_key = Textbox(label="Enter your OpenAI API Key")
100
+ # Use 'binary' type to receive the file's content directly as a binary object
101
+ input_pdf_file = File(label="Upload your PDF resume", type="binary")
102
  output_yaml = Textbox(label="Formatted Resume in YAML")
103
 
104
  iface = gr.Interface(
 
114
  if __name__ == "__main__":
115
  main()
116
 
117
+