yashxx07 commited on
Commit
09c5387
·
verified ·
1 Parent(s): 7385806

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -9,7 +9,7 @@ import replicate
9
 
10
  class Item(BaseModel):
11
  url: str
12
- percentage: int
13
 
14
  app = FastAPI()
15
 
@@ -71,7 +71,8 @@ async def root(item: Item):
71
  def event_generator():
72
  for event in replicate.stream("snowflake/snowflake-arctic-instruct", input={
73
  "prompt": "summarize this following news article:" + article,
74
- "temperature": 0.2
 
75
  }):
76
  # Yield the event as a string
77
  yield str(event)
 
9
 
10
  class Item(BaseModel):
11
  url: str
12
+ max_tokens: int
13
 
14
  app = FastAPI()
15
 
 
71
  def event_generator():
72
  for event in replicate.stream("snowflake/snowflake-arctic-instruct", input={
73
  "prompt": "summarize this following news article:" + article,
74
+ "temperature": 0.2,
75
+ "max_new_tokens" : item.max_tokens
76
  }):
77
  # Yield the event as a string
78
  yield str(event)