devanshdhir commited on
Commit
a304b43
·
verified ·
1 Parent(s): 58fa63c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ def get_flask_answer(question):
35
 
36
  # Generate the response
37
  # We use a low temperature for more factual, less "creative" answers.
38
- # Adding EOS token as a stopping criterion helps prevent over-generation.
39
  outputs = pipe(
40
  prompt,
41
  max_new_tokens=256,
@@ -55,7 +55,7 @@ def get_flask_answer(question):
55
  return "The model did not generate a response in the expected format. Please try again."
56
 
57
  # --- 3. Create the Gradio Interface ---
58
- # This creates the web UI with input/output components.
59
  with gr.Blocks(theme=gr.themes.Soft()) as iface:
60
  gr.Markdown(
61
  """
 
35
 
36
  # Generate the response
37
  # We use a low temperature for more factual, less "creative" answers.
38
+ # Adding EOS token as a stopping criterion helps prevent over-generation and fixes protocol errors.
39
  outputs = pipe(
40
  prompt,
41
  max_new_tokens=256,
 
55
  return "The model did not generate a response in the expected format. Please try again."
56
 
57
  # --- 3. Create the Gradio Interface ---
58
+ # This creates the web UI with input/output components using a theme.
59
  with gr.Blocks(theme=gr.themes.Soft()) as iface:
60
  gr.Markdown(
61
  """