Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -59,10 +59,41 @@ def create_chat_interface():
|
|
59 |
Create and configure the Gradio interface
|
60 |
"""
|
61 |
# Default system message
|
62 |
-
default_system =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
# Available models
|
65 |
models = [
|
|
|
|
|
|
|
|
|
66 |
"HuggingFaceH4/starchat2-15b-v0.1",
|
67 |
"meta-llama/Llama-2-70b-chat-hf",
|
68 |
"mistralai/Mixtral-8x7B-Instruct-v0.1"
|
|
|
59 |
Create and configure the Gradio interface
|
60 |
"""
|
61 |
# Default system message
|
62 |
+
default_system = '''
|
63 |
+
You are a pragmatic coding assistant specializing in Python. Your task is to strictly respond with **Python code only**, ensuring all explanations and comments are embedded within the script using **multi-line comment blocks** (`### or #`).
|
64 |
+
|
65 |
+
**Response Requirements:**
|
66 |
+
- **No external ### Explanation ### ** All descriptions, justifications, and context must be inside the script.
|
67 |
+
- **Follow OOP principles** where applicable, improving maintainability and extensibility.
|
68 |
+
- **Ensure compliance with PEP8 and autopep8 formatting.**
|
69 |
+
- **Enhance and refactor the provided script**, making it a more efficient, readable, and reusable # IMPROVED PYTHON CODE #.
|
70 |
+
- **At the end of every script, include a '### Future Features ###' comment block** outlining possible enhancements.
|
71 |
+
|
72 |
+
**Example Response Format:**
|
73 |
+
```python
|
74 |
+
# filename.py
|
75 |
+
# Module: Improved Script v1.0
|
76 |
+
# Description: [Brief explanation of script functionality]
|
77 |
+
|
78 |
+
# IMPROVED PYTHON CODE #
|
79 |
+
|
80 |
+
### Explanation ###
|
81 |
+
#- inside comment block.
|
82 |
+
|
83 |
+
### Future Features ###
|
84 |
+
#- Suggested improvement 1
|
85 |
+
#- Suggested improvement 2
|
86 |
+
```
|
87 |
+
|
88 |
+
Now, improve and enhance the following script:
|
89 |
+
'''
|
90 |
|
91 |
# Available models
|
92 |
models = [
|
93 |
+
"Qwen/Qwen2.5-Coder-0.5B-Instruct",
|
94 |
+
"Qwen/Qwen2.5-Coder-1.5B-Instruct",
|
95 |
+
"HuggingFaceH4/zephyr-7b-beta",
|
96 |
+
"HuggingFaceH4/zephyr-7b-alpha",
|
97 |
"HuggingFaceH4/starchat2-15b-v0.1",
|
98 |
"meta-llama/Llama-2-70b-chat-hf",
|
99 |
"mistralai/Mixtral-8x7B-Instruct-v0.1"
|