mgokg commited on
Commit
d1d9757
·
verified ·
1 Parent(s): ff71959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -12,6 +12,12 @@ client_chroma = chromadb.Client()
12
  collection_name = "pdf_collection"
13
  collection = client_chroma.get_or_create_collection(name=collection_name)
14
 
 
 
 
 
 
 
15
  # Verwende die integrierten Embeddings von ChromaDB
16
  embedding_function = embedding_functions.DefaultEmbeddingFunction()
17
 
@@ -115,7 +121,7 @@ with gr.Blocks() as upload:
115
  file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
116
  upload_output = gr.Textbox(label="Upload Status")
117
  with gr.Row():
118
- submit_button = gr.Button("upload").style(full_width=False, width="300px")
119
  submit_button.click(process_pdf, inputs=file_input, outputs=upload_output)
120
 
121
  # Erstelle die Gradio-Schnittstelle
@@ -125,6 +131,5 @@ with gr.Blocks() as demo:
125
  )
126
 
127
 
128
-
129
  # Starte die Gradio-Anwendung
130
- demo.launch()
 
12
  collection_name = "pdf_collection"
13
  collection = client_chroma.get_or_create_collection(name=collection_name)
14
 
15
+ custom_css = """
16
+ .gr-button {
17
+ width: 300px; /* Set the width of the button */
18
+ }
19
+ """
20
+
21
  # Verwende die integrierten Embeddings von ChromaDB
22
  embedding_function = embedding_functions.DefaultEmbeddingFunction()
23
 
 
121
  file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
122
  upload_output = gr.Textbox(label="Upload Status")
123
  with gr.Row():
124
+ submit_button = gr.Button("upload")
125
  submit_button.click(process_pdf, inputs=file_input, outputs=upload_output)
126
 
127
  # Erstelle die Gradio-Schnittstelle
 
131
  )
132
 
133
 
 
134
  # Starte die Gradio-Anwendung
135
+ demo.launch(css=custom_css)