Papaya-Voldemort commited on
Commit
58b67c2
·
verified ·
1 Parent(s): b0e67d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -52,17 +52,15 @@ def chat(selected_model, user_input, chat_history, system_prompt=""):
52
  truncation=True
53
  )
54
 
55
- # Generate the response with a progress indicator
56
- with gr.Progress() as progress:
57
- progress(0.5, desc="Generating response...")
58
- response = generator(
59
- inputs['input_ids'],
60
- max_length=max_length,
61
- num_return_sequences=1,
62
- do_sample=True,
63
- top_p=0.95,
64
- top_k=60
65
- )[0]['generated_text']
66
 
67
  # Append the interaction to the chat history
68
  chat_history.append((user_input, response))
 
52
  truncation=True
53
  )
54
 
55
+ # Generate the response
56
+ response = generator(
57
+ inputs['input_ids'],
58
+ max_length=max_length,
59
+ num_return_sequences=1,
60
+ do_sample=True,
61
+ top_p=0.95,
62
+ top_k=60
63
+ )[0]['generated_text']
 
 
64
 
65
  # Append the interaction to the chat history
66
  chat_history.append((user_input, response))