Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ Question:
|
|
92 |
|
93 |
Answer
|
94 |
"""
|
95 |
-
|
96 |
prompt = ChatPromptTemplate.from_template(template)
|
97 |
|
98 |
# Create the RAG chain
|
@@ -104,6 +104,7 @@ rag_chain = (
|
|
104 |
)
|
105 |
|
106 |
# Define the Gradio function
|
|
|
107 |
def ask_question_gradio(question):
|
108 |
result = ""
|
109 |
for chunk in rag_chain.stream(question):
|
|
|
92 |
|
93 |
Answer
|
94 |
"""
|
95 |
+
|
96 |
prompt = ChatPromptTemplate.from_template(template)
|
97 |
|
98 |
# Create the RAG chain
|
|
|
104 |
)
|
105 |
|
106 |
# Define the Gradio function
|
107 |
+
@spaces.GPU(duration=120)
|
108 |
def ask_question_gradio(question):
|
109 |
result = ""
|
110 |
for chunk in rag_chain.stream(question):
|