os1187 commited on
Commit
cd51bc4
·
verified ·
1 Parent(s): 3146891

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,12 +21,13 @@ css = """
21
 
22
  # Define layout with custom styles
23
  layout = [
24
- gr.Row([gr.File(label="Upload PDF", type="filepath")]), # Changed 'file' to 'filepath'
25
- gr.Row([gr.Button("Generate Insights", type="submit")]),
26
  gr.Row([gr.Textbox("Placeholder for PDF insights", label="Insights", type="text")])
27
  ]
28
 
29
 
 
30
  # Function to get image embeddings using ViT
31
  def get_image_embeddings(image_path, model_name='google/vit-base-patch16-224'):
32
  feature_extractor = ViTFeatureExtractor.from_pretrained(model_name)
 
21
 
22
  # Define layout with custom styles
23
  layout = [
24
+ gr.Row([gr.File(label="Upload PDF", type="filepath")]),
25
+ gr.Row([gr.Button("Generate Insights")]), # Removed the type="submit"
26
  gr.Row([gr.Textbox("Placeholder for PDF insights", label="Insights", type="text")])
27
  ]
28
 
29
 
30
+
31
  # Function to get image embeddings using ViT
32
  def get_image_embeddings(image_path, model_name='google/vit-base-patch16-224'):
33
  feature_extractor = ViTFeatureExtractor.from_pretrained(model_name)