ranamhamoud commited on
Commit
df6789d
·
verified ·
1 Parent(s): 96cee4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -51,17 +51,17 @@ class Story(Document):
51
  story_id = SequenceField(primary_key=True)
52
 
53
  def make_prompt(entry):
54
- return f"### Human:YOUR INSTRUCTION HERE,ALWAYS USE A STORY,RELATE TO COMPUTER SCIENCE, INCLUDE ASSESMENTS AND A TECHNICAL SUMMARY: {entry} ### Assistant:"
55
 
56
  @spaces.GPU
57
  def generate(
58
  message: str,
59
  chat_history: list[tuple[str, str]],
60
  max_new_tokens: int = 1024,
61
- temperature: float = 0.4,
62
  top_p: float = 0.6,
63
- top_k: int = 20,
64
- repetition_penalty: float = 1.2,
65
 
66
  ) -> Iterator[str]:
67
  conversation = []
 
51
  story_id = SequenceField(primary_key=True)
52
 
53
  def make_prompt(entry):
54
+ return f"### Human:YOUR INSTRUCTION HERE,TELL A STORY,RELATE TO COMPUTER SCIENCE: {entry} ### Assistant:"
55
 
56
  @spaces.GPU
57
  def generate(
58
  message: str,
59
  chat_history: list[tuple[str, str]],
60
  max_new_tokens: int = 1024,
61
+ temperature: float = 0.5,
62
  top_p: float = 0.6,
63
+ top_k: int = 40,
64
+ repetition_penalty: float = 1.0,
65
 
66
  ) -> Iterator[str]:
67
  conversation = []