Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def search_similar_documents(prompt):
|
|
51 |
filename = metadata["filename"]
|
52 |
formatted_results.append(f"Datei: {filename}\nText: {doc}\n")
|
53 |
|
54 |
-
res = ask_llm(prompt
|
55 |
#f"{prompt} {formatted_results)}"
|
56 |
#return "\n".join(formatted_results)
|
57 |
return res
|
@@ -60,8 +60,8 @@ def ask_llm(prompt):
|
|
60 |
client_llm = Client("wasmdashai/meta-llama-Llama-3.2-3B-Instruct")
|
61 |
#client = Client("KingNish/OpenGPT-4o")
|
62 |
result = client_llm.predict(
|
63 |
-
param_0=prompt,
|
64 |
-
|
65 |
#user_prompt={"text":"","files":[]},
|
66 |
api_name="/chat"
|
67 |
)
|
@@ -77,7 +77,7 @@ with gr.Blocks() as demo:
|
|
77 |
#submit_button = gr.Button("Hochladen")
|
78 |
upload_output = gr.Textbox(label="Upload Status")
|
79 |
with gr.Row():
|
80 |
-
submit_button = gr.Button("
|
81 |
with gr.Row():
|
82 |
prompt_input = gr.Textbox(label="Suche nach ähnlichen Dokumenten", placeholder="Gib einen Suchbegriff ein")
|
83 |
#search_button = gr.Button("Suchen")
|
@@ -90,7 +90,7 @@ with gr.Blocks() as demo:
|
|
90 |
#llm_submit_button = gr.Button("Fragen")
|
91 |
llm_output = gr.Textbox(label="LLM Antwort")
|
92 |
with gr.Row():
|
93 |
-
llm_submit_button = gr.Button("
|
94 |
|
95 |
submit_button.click(process_pdf, inputs=file_input, outputs=upload_output)
|
96 |
search_button.click(search_similar_documents, inputs=prompt_input, outputs=search_output)
|
|
|
51 |
filename = metadata["filename"]
|
52 |
formatted_results.append(f"Datei: {filename}\nText: {doc}\n")
|
53 |
|
54 |
+
res = ask_llm(prompt)
|
55 |
#f"{prompt} {formatted_results)}"
|
56 |
#return "\n".join(formatted_results)
|
57 |
return res
|
|
|
60 |
client_llm = Client("wasmdashai/meta-llama-Llama-3.2-3B-Instruct")
|
61 |
#client = Client("KingNish/OpenGPT-4o")
|
62 |
result = client_llm.predict(
|
63 |
+
#param_0=prompt,
|
64 |
+
user_prompt=prompt,
|
65 |
#user_prompt={"text":"","files":[]},
|
66 |
api_name="/chat"
|
67 |
)
|
|
|
77 |
#submit_button = gr.Button("Hochladen")
|
78 |
upload_output = gr.Textbox(label="Upload Status")
|
79 |
with gr.Row():
|
80 |
+
submit_button = gr.Button("upload")
|
81 |
with gr.Row():
|
82 |
prompt_input = gr.Textbox(label="Suche nach ähnlichen Dokumenten", placeholder="Gib einen Suchbegriff ein")
|
83 |
#search_button = gr.Button("Suchen")
|
|
|
90 |
#llm_submit_button = gr.Button("Fragen")
|
91 |
llm_output = gr.Textbox(label="LLM Antwort")
|
92 |
with gr.Row():
|
93 |
+
llm_submit_button = gr.Button("send")
|
94 |
|
95 |
submit_button.click(process_pdf, inputs=file_input, outputs=upload_output)
|
96 |
search_button.click(search_similar_documents, inputs=prompt_input, outputs=search_output)
|