Spaces:
Sleeping
Sleeping
Commit
·
acc1121
1
Parent(s):
5da89c6
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ REPO_ID = "HuggingFaceH4/starchat-beta"
|
|
26 |
llm = HuggingFaceHub(
|
27 |
repo_id=REPO_ID,
|
28 |
model_kwargs={
|
29 |
-
"max_new_tokens":
|
30 |
"do_sample": True,
|
31 |
"temperature": 0.8,
|
32 |
"top_p": 0.9
|
@@ -65,7 +65,7 @@ def get_data(category: str, lookback_days: float, user_query: str):
|
|
65 |
output = stuff_chain({"input_documents": relevant_docs, "context": user_query})
|
66 |
output_text = output["output_text"].split("<|end|>")[0]
|
67 |
print("LLM output:", output_text)
|
68 |
-
return f"# Your AI curated newsletter\n{output_text}\n\n
|
69 |
|
70 |
with gr.Blocks() as demo:
|
71 |
gr.Markdown(
|
|
|
26 |
llm = HuggingFaceHub(
|
27 |
repo_id=REPO_ID,
|
28 |
model_kwargs={
|
29 |
+
"max_new_tokens": 1024,
|
30 |
"do_sample": True,
|
31 |
"temperature": 0.8,
|
32 |
"top_p": 0.9
|
|
|
65 |
output = stuff_chain({"input_documents": relevant_docs, "context": user_query})
|
66 |
output_text = output["output_text"].split("<|end|>")[0]
|
67 |
print("LLM output:", output_text)
|
68 |
+
return f"# Your AI curated newsletter\n{output_text}\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n## This newsletter was AI generated by filtering {len(docs)} articles down to the following relevant articles:\n\n{articles}"
|
69 |
|
70 |
with gr.Blocks() as demo:
|
71 |
gr.Markdown(
|