Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -70,9 +70,9 @@ async def root(item: Item):
|
|
70 |
|
71 |
def event_generator():
|
72 |
for event in replicate.stream("snowflake/snowflake-arctic-instruct", input={
|
73 |
-
"prompt": "summarize this
|
74 |
"temperature": 0.2,
|
75 |
-
"max_new_tokens" :
|
76 |
}):
|
77 |
# Yield the event as a string
|
78 |
yield str(event)
|
|
|
70 |
|
71 |
def event_generator():
|
72 |
for event in replicate.stream("snowflake/snowflake-arctic-instruct", input={
|
73 |
+
"prompt": f"summarize this news article in {item.max_tokens} lines:" + article,
|
74 |
"temperature": 0.2,
|
75 |
+
"max_new_tokens" : 1000
|
76 |
}):
|
77 |
# Yield the event as a string
|
78 |
yield str(event)
|