Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -11,8 +11,9 @@ from huggingface_hub import snapshot_download | |
| 11 | 
             
            from llama_cpp import Llama
         | 
| 12 |  | 
| 13 |  | 
| 14 | 
            -
            SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named " | 
| 15 | 
             
            You are good at speaking English and Chinese.
         | 
|  | |
| 16 | 
             
            You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
         | 
| 17 | 
             
            You are based on Cecilia model, trained by "SSFW NLPark" team, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
         | 
| 18 | 
             
            Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
         | 
| @@ -42,8 +43,8 @@ def get_system_tokens(model): | |
| 42 | 
             
                return get_message_tokens(model, **system_message)
         | 
| 43 |  | 
| 44 |  | 
| 45 | 
            -
            repo_name = " | 
| 46 | 
            -
            model_name = " | 
| 47 |  | 
| 48 | 
             
            snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
         | 
| 49 |  | 
| @@ -103,8 +104,8 @@ with gr.Blocks( | |
| 103 | 
             
                theme=gr.themes.Soft()
         | 
| 104 | 
             
            ) as demo:
         | 
| 105 | 
             
                gr.Markdown(f"""<h1><center>JWorld-Cecilia-人工智能助理</center></h1>""")
         | 
| 106 | 
            -
                gr.Markdown(value=""" | 
| 107 | 
            -
                    这是量化版 Cecilia 的部署,具有  | 
| 108 | 
             
                    Cecilia 是一种会话语言模型,在多种类型的语料库上进行训练。
         | 
| 109 | 
             
                    本节目由上海师范大学附属外国语中学 & JWorld NLPark 赞助播出""")
         | 
| 110 |  | 
|  | |
| 11 | 
             
            from llama_cpp import Llama
         | 
| 12 |  | 
| 13 |  | 
| 14 | 
            +
            SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named "Schariac" in English or "沙尼亚特" in Chinese.
         | 
| 15 | 
             
            You are good at speaking English and Chinese.
         | 
| 16 | 
            +
            You are good at math and programming.
         | 
| 17 | 
             
            You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
         | 
| 18 | 
             
            You are based on Cecilia model, trained by "SSFW NLPark" team, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
         | 
| 19 | 
             
            Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
         | 
|  | |
| 43 | 
             
                return get_message_tokens(model, **system_message)
         | 
| 44 |  | 
| 45 |  | 
| 46 | 
            +
            repo_name = "sprint-mammoth/openbuddy-llemma-34b-v13.1-GGUF"
         | 
| 47 | 
            +
            model_name = "openbuddy-llemma-34b-v13.1-Q4_K_M.gguf"
         | 
| 48 |  | 
| 49 | 
             
            snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
         | 
| 50 |  | 
|  | |
| 104 | 
             
                theme=gr.themes.Soft()
         | 
| 105 | 
             
            ) as demo:
         | 
| 106 | 
             
                gr.Markdown(f"""<h1><center>JWorld-Cecilia-人工智能助理</center></h1>""")
         | 
| 107 | 
            +
                gr.Markdown(value="""这是一个多语言数学与编程模型的部署。
         | 
| 108 | 
            +
                    这是量化版 Cecilia 的部署,具有 340亿 个参数,在 CPU 上运行。
         | 
| 109 | 
             
                    Cecilia 是一种会话语言模型,在多种类型的语料库上进行训练。
         | 
| 110 | 
             
                    本节目由上海师范大学附属外国语中学 & JWorld NLPark 赞助播出""")
         | 
| 111 |  |