Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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")
|
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)
|