Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -287,40 +287,33 @@ css = """
|
|
| 287 |
"""
|
| 288 |
etext = """In America, where cars are an important part of the national psyche, a decade ago people had suddenly started to drive less, which had not happened since the oil shocks of the 1970s. """
|
| 289 |
examples_list = [
|
| 290 |
-
["
|
| 291 |
[
|
| 292 |
-
"What
|
| 293 |
],
|
| 294 |
-
["
|
| 295 |
-
["
|
| 296 |
-
["
|
| 297 |
-
["
|
| 298 |
[
|
| 299 |
-
"
|
| 300 |
],
|
| 301 |
-
["What are some
|
| 302 |
-
["
|
| 303 |
-
["
|
| 304 |
-
["
|
| 305 |
-
["
|
| 306 |
-
["
|
| 307 |
-
["
|
| 308 |
-
["
|
| 309 |
-
["
|
| 310 |
-
["
|
| 311 |
-
["
|
| 312 |
-
["
|
| 313 |
-
["
|
| 314 |
-
["
|
| 315 |
-
["
|
| 316 |
-
|
| 317 |
-
[f"{etext} \n 翻成中文,保留原意,但使用文学性的语言。不要写解释。列出3个版本。"],
|
| 318 |
-
["假定 1 + 2 = 4, 试求 7 + 8。"],
|
| 319 |
-
["给出判断一个数是不是质数的 javascript 码。"],
|
| 320 |
-
["给出实现python 里 range(10)的 javascript 码。"],
|
| 321 |
-
["给出实现python 里 [*(range(10)]的 javascript 码。"],
|
| 322 |
-
["Erkläre die Handlung von Cinderella in einem Satz."],
|
| 323 |
-
["Erkläre die Handlung von Cinderella in einem Satz. Auf Deutsch."],
|
| 324 |
]
|
| 325 |
|
| 326 |
logger.info("start block")
|
|
@@ -331,15 +324,13 @@ with gr.Blocks(
|
|
| 331 |
css=css,
|
| 332 |
) as block:
|
| 333 |
# buff_var = gr.State("")
|
| 334 |
-
with gr.Accordion("🎈 Info", open=
|
| 335 |
# gr.HTML(
|
| 336 |
# """<center><a href="https://huggingface.co/spaces/mikeee/mpt-30b-chat?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate"></a> and spin a CPU UPGRADE to avoid the queue</center>"""
|
| 337 |
# )
|
| 338 |
gr.Markdown(
|
| 339 |
f"""<h5><center>{Path(model_loc).name}</center></h4>
|
| 340 |
-
|
| 341 |
-
You probably should try to test
|
| 342 |
-
some related prompts.""",
|
| 343 |
elem_classes="xsmall",
|
| 344 |
)
|
| 345 |
|
|
@@ -352,7 +343,7 @@ with gr.Blocks(
|
|
| 352 |
with gr.Column(scale=5):
|
| 353 |
msg = gr.Textbox(
|
| 354 |
label="Chat Message Box",
|
| 355 |
-
placeholder="Ask me
|
| 356 |
show_label=False,
|
| 357 |
# container=False,
|
| 358 |
lines=6,
|
|
|
|
| 287 |
"""
|
| 288 |
etext = """In America, where cars are an important part of the national psyche, a decade ago people had suddenly started to drive less, which had not happened since the oil shocks of the 1970s. """
|
| 289 |
examples_list = [
|
| 290 |
+
["How can I start learning JavaScript? Recommend some beginner-friendly resources."],
|
| 291 |
[
|
| 292 |
+
"What are the key steps to build a simple website from scratch?"
|
| 293 |
],
|
| 294 |
+
["Explain the concept of object-oriented programming in Python."],
|
| 295 |
+
["What are the essential programming languages for web development"],
|
| 296 |
+
["Explain the importance of cybersecurity awareness and suggest resources to learn about it."],
|
| 297 |
+
["How can I improve my problem-solving skills in programming?"],
|
| 298 |
[
|
| 299 |
+
"Explain the concept of blockchain and its applications in various industries."
|
| 300 |
],
|
| 301 |
+
["What are some free resources to learn data science and statistical analysis?"],
|
| 302 |
+
["Explain the basics of search engine optimization (SEO) and its importance for websites."],
|
| 303 |
+
["Explain the concept of cloud computing and its benefits for businesses."],
|
| 304 |
+
["What are the best resources to learn about machine learning algorithms and their implementations?"],
|
| 305 |
+
["Suggest practical projects to enhance my coding skills and apply theoretical knowledge."],
|
| 306 |
+
["What are the best online platforms for learning languages"],
|
| 307 |
+
["Suggest resources and platforms for learning front-end web development, including HTML, CSS, and JavaScript.],
|
| 308 |
+
["What are some effective strategies for learning to code collaboratively with others?"],
|
| 309 |
+
["What are the emerging trends in virtual reality (VR) and augmented reality (AR) technologies?"],
|
| 310 |
+
["Explain http request"],
|
| 311 |
+
["what is CNN in AI?"],
|
| 312 |
+
["what is NLP in AI?"],
|
| 313 |
+
["write hello world in cpp"],
|
| 314 |
+
["write fibonacci series in JavaScript"],
|
| 315 |
+
["Explain classes in Java in short "],
|
| 316 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
]
|
| 318 |
|
| 319 |
logger.info("start block")
|
|
|
|
| 324 |
css=css,
|
| 325 |
) as block:
|
| 326 |
# buff_var = gr.State("")
|
| 327 |
+
with gr.Accordion("🎈 Info", open=True):
|
| 328 |
# gr.HTML(
|
| 329 |
# """<center><a href="https://huggingface.co/spaces/mikeee/mpt-30b-chat?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate"></a> and spin a CPU UPGRADE to avoid the queue</center>"""
|
| 330 |
# )
|
| 331 |
gr.Markdown(
|
| 332 |
f"""<h5><center>{Path(model_loc).name}</center></h4>
|
| 333 |
+
VecDigiChat: Level Up Your Communication - Unleashing the Power of Llama 2B LLM! powered by LAVAN and HuggingSpace.This is a part of VEC DigiLib Project""",
|
|
|
|
|
|
|
| 334 |
elem_classes="xsmall",
|
| 335 |
)
|
| 336 |
|
|
|
|
| 343 |
with gr.Column(scale=5):
|
| 344 |
msg = gr.Textbox(
|
| 345 |
label="Chat Message Box",
|
| 346 |
+
placeholder="Ask me any doubt related to learning (press Shift+Enter or click Submit to send)",
|
| 347 |
show_label=False,
|
| 348 |
# container=False,
|
| 349 |
lines=6,
|