Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
-
from rag_pipeline import run_qa_pipeline
|
3 |
|
4 |
def answer_question(query):
|
5 |
-
|
6 |
-
answer = run_qa_pipeline(query)
|
7 |
-
return answer
|
8 |
-
except Exception as e:
|
9 |
-
return f"Fehler: {str(e)}"
|
10 |
|
11 |
iface = gr.Interface(
|
12 |
fn=answer_question,
|
13 |
-
inputs=gr.Textbox(label="
|
14 |
outputs="text",
|
15 |
-
title="
|
16 |
-
description="
|
17 |
allow_flagging="never"
|
18 |
)
|
19 |
|
|
|
1 |
import gradio as gr
|
2 |
+
from rag_pipeline import run_qa_pipeline # Achte auf den richtigen Funktionsnamen
|
3 |
|
4 |
def answer_question(query):
|
5 |
+
return run_qa_pipeline(query, k=5)
|
|
|
|
|
|
|
|
|
6 |
|
7 |
iface = gr.Interface(
|
8 |
fn=answer_question,
|
9 |
+
inputs=gr.Textbox(label="Deine Frage zu Catan"),
|
10 |
outputs="text",
|
11 |
+
title="🎲 Catan Regel-Experte (RAG)",
|
12 |
+
description="Stelle Fragen zu den Catan-Regeln. Die App verwendet semantische Suche und KI, um Antworten zu geben.",
|
13 |
allow_flagging="never"
|
14 |
)
|
15 |
|