Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# app.py (with
|
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
|
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",
|