Spaces:
Runtime error
Runtime error
oryx1729
commited on
Commit
·
76d2ac6
1
Parent(s):
75ca03c
Add params
Browse files- app.py +2 -1
- pipeline.yaml +5 -0
app.py
CHANGED
|
@@ -32,7 +32,8 @@ def main():
|
|
| 32 |
app_init()
|
| 33 |
st.title("Haystack Demo")
|
| 34 |
input = st.text_input("Query ...")
|
| 35 |
-
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
if __name__ == "__main__":
|
|
|
|
| 32 |
app_init()
|
| 33 |
st.title("Haystack Demo")
|
| 34 |
input = st.text_input("Query ...")
|
| 35 |
+
result = p.run(input)
|
| 36 |
+
st.text()
|
| 37 |
|
| 38 |
|
| 39 |
if __name__ == "__main__":
|
pipeline.yaml
CHANGED
|
@@ -15,6 +15,11 @@ components:
|
|
| 15 |
type: OpenAIAnswerGenerator
|
| 16 |
params:
|
| 17 |
model: text-davinci-003
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
- name: TextFileConverter
|
| 20 |
type: TextConverter
|
|
|
|
| 15 |
type: OpenAIAnswerGenerator
|
| 16 |
params:
|
| 17 |
model: text-davinci-003
|
| 18 |
+
max_tokens: 200 # The maximum number of tokens allowed for each generated Answer.
|
| 19 |
+
temperature: 0.8 # Determines the randomness of the model. Higher values mean the model will take more risks
|
| 20 |
+
frequency_penalty: 0.1 # Positive values penalize new tokens based on their existing frequency in the text so far.
|
| 21 |
+
presence_penalty: 0.1 # Positive values penalize new tokens based on whether they have already appeared in the text.
|
| 22 |
+
top_k: 3 # The number of results to return
|
| 23 |
|
| 24 |
- name: TextFileConverter
|
| 25 |
type: TextConverter
|