venture2 commited on
Commit
534010d
·
verified ·
1 Parent(s): 91c41e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # app.py (with 1024-character limit)
2
  import gradio as gr
3
  import torch
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
@@ -131,7 +131,7 @@ Choose a programming language for more tailored responses. Limited to 1024 chara
131
  iface = gr.Interface(
132
  fn=code_assistant,
133
  inputs=[
134
- gr.Textbox(lines=5, placeholder="Ask a coding question or paste your code here...", max_chars=1024),
135
  gr.Dropdown(choices=["Python", "JavaScript", "Java", "C++", "HTML", "CSS", "SQL", "Other"], label="Programming Language")
136
  ],
137
  outputs="text",
 
1
+ # app.py (updated with no `max_chars` and using correct model initialization)
2
  import gradio as gr
3
  import torch
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
131
  iface = gr.Interface(
132
  fn=code_assistant,
133
  inputs=[
134
+ gr.Textbox(lines=5, placeholder="Ask a coding question or paste your code here..."), # Removed `max_chars`
135
  gr.Dropdown(choices=["Python", "JavaScript", "Java", "C++", "HTML", "CSS", "SQL", "Other"], label="Programming Language")
136
  ],
137
  outputs="text",