Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,12 +4,14 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 4 |
import spaces
|
| 5 |
|
| 6 |
title = """# π€΅Welcome to SAK's CodBot π» (A Coding ChatBot) βββ"""
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
CodingBot leverages LlamaforCausalLM.
|
| 10 |
|
| 11 |
CodingBot supports 'java', 'javascript', 'c++', 'c#', 'c', 'html', 'java_server_pages', 'python', 'php', 'go', 'kotlin', 'swift', 'dart', 'shell', 'json', 'lua', 'matlab', 'yaml', 'css', 'rust', 'sql', 'ruby', 'tex', 'objective-c', 'powershell', 'ocaml', 'groovy', 'cmake', 'julia', 'perl', 'assembly', 'haskell', 'fortran', 'pascal', 'rmarkdown', 'scala', 'visual_basic', 'verilog', 'prolog', 'r', 'dockerfile','cobol', 'batchfile', 'toml', 'lisp', 'erlang', 'coffeescript', 'makefile', 'clojure', 'elixir'
|
| 12 |
-
|
| 13 |
**Demo by [Sunder Ali Khowaja](https://sander-ali.github.io) - [X](https://x.com/SunderAKhowaja) -[Github](https://github.com/sander-ali) -[Hugging Face](https://huggingface.co/SunderAli17)**
|
| 14 |
"""
|
| 15 |
|
|
@@ -60,7 +62,7 @@ function refresh() {
|
|
| 60 |
"""
|
| 61 |
with gr.Blocks(js = js_func, theme = theme) as SAK:
|
| 62 |
gr.Markdown(title)
|
| 63 |
-
gr.Markdown(
|
| 64 |
|
| 65 |
system_prompt_input = gr.Textbox(
|
| 66 |
label="π¨βπ» CodBot Instruction:",
|
|
@@ -69,9 +71,9 @@ with gr.Blocks(js = js_func, theme = theme) as SAK:
|
|
| 69 |
)
|
| 70 |
user_prompt_input = gr.Code(
|
| 71 |
label="β Coding Prompt π»",
|
| 72 |
-
value="
|
| 73 |
language="python",
|
| 74 |
-
lines=
|
| 75 |
)
|
| 76 |
code_output = gr.Code(label="π¨βπ» CodBot", language='python', lines=50, interactive=True)
|
| 77 |
max_length_slider = gr.Slider(minimum=1, maximum=1800, value=650, label="Max Token Length")
|
|
|
|
| 4 |
import spaces
|
| 5 |
|
| 6 |
title = """# π€΅Welcome to SAK's CodBot π» (A Coding ChatBot) βββ"""
|
| 7 |
+
|
| 8 |
+
MARKDOWN = """
|
| 9 |
+
CodingBot is an open-source coding language model that delivers excellent performance.
|
| 10 |
|
| 11 |
CodingBot leverages LlamaforCausalLM.
|
| 12 |
|
| 13 |
CodingBot supports 'java', 'javascript', 'c++', 'c#', 'c', 'html', 'java_server_pages', 'python', 'php', 'go', 'kotlin', 'swift', 'dart', 'shell', 'json', 'lua', 'matlab', 'yaml', 'css', 'rust', 'sql', 'ruby', 'tex', 'objective-c', 'powershell', 'ocaml', 'groovy', 'cmake', 'julia', 'perl', 'assembly', 'haskell', 'fortran', 'pascal', 'rmarkdown', 'scala', 'visual_basic', 'verilog', 'prolog', 'r', 'dockerfile','cobol', 'batchfile', 'toml', 'lisp', 'erlang', 'coffeescript', 'makefile', 'clojure', 'elixir'
|
| 14 |
+
|
| 15 |
**Demo by [Sunder Ali Khowaja](https://sander-ali.github.io) - [X](https://x.com/SunderAKhowaja) -[Github](https://github.com/sander-ali) -[Hugging Face](https://huggingface.co/SunderAli17)**
|
| 16 |
"""
|
| 17 |
|
|
|
|
| 62 |
"""
|
| 63 |
with gr.Blocks(js = js_func, theme = theme) as SAK:
|
| 64 |
gr.Markdown(title)
|
| 65 |
+
gr.Markdown(MARKDOWN)
|
| 66 |
|
| 67 |
system_prompt_input = gr.Textbox(
|
| 68 |
label="π¨βπ» CodBot Instruction:",
|
|
|
|
| 71 |
)
|
| 72 |
user_prompt_input = gr.Code(
|
| 73 |
label="β Coding Prompt π»",
|
| 74 |
+
value="Shopping website in HTML and Java",
|
| 75 |
language="python",
|
| 76 |
+
lines=50
|
| 77 |
)
|
| 78 |
code_output = gr.Code(label="π¨βπ» CodBot", language='python', lines=50, interactive=True)
|
| 79 |
max_length_slider = gr.Slider(minimum=1, maximum=1800, value=650, label="Max Token Length")
|