zipin commited on
Commit
3a1601c
·
verified ·
1 Parent(s): 612bacc

请求编辑

Browse files
Files changed (2) hide show
  1. about.html +26 -0
  2. index.html +20 -22
about.html ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width" />
6
+ <title>关于我们 | My static Space</title>
7
+ <link rel="stylesheet" href="style.css" />
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ </head>
11
+ <body>
12
+ <div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl m-4">
13
+ <div class="p-8">
14
+ <h1 class="text-2xl font-bold text-gray-800 mb-4">关于我们</h1>
15
+ <p class="text-gray-600 mb-6">这是一个简单的静态网站示例,展示了如何使用HTML和CSS创建现代网页。</p>
16
+ <div class="flex items-center">
17
+ <i data-feather="arrow-left" class="mr-2 text-blue-500"></i>
18
+ <a href="index.html" class="text-blue-500 hover:underline">返回首页</a>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <script>
23
+ feather.replace();
24
+ </script>
25
+ </body>
26
+ </html>
index.html CHANGED
@@ -11,17 +11,31 @@
11
  <body>
12
  <div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl m-4">
13
  <div class="p-8">
14
- <h1 class="text-2xl font-bold text-gray-800 mb-4">Welcome to your static Space!</h1>
15
- <p class="text-gray-600 mb-4">You can modify this app directly by editing <i class="font-mono">index.html</i> in the Files and versions tab.</p>
16
- <div class="flex items-center">
17
  <i data-feather="book" class="mr-2 text-blue-500"></i>
18
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank" class="text-blue-500 hover:underline">Spaces documentation</a>
19
  </div>
20
- </div>
 
 
 
 
21
  </div>
22
  <script>
23
  feather.replace();
24
  </script>
 
 
 
 
 
 
 
 
 
 
25
  </body>
26
  </html>
27
  # Use a pipeline as a high-level helper
@@ -33,20 +47,4 @@ messages = [
33
  ]
34
  pipe(messages)
35
  # Load model directly
36
- from transformers import AutoTokenizer, AutoModelForCausalLM
37
-
38
- tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-3.2-instruct-78b")
39
- model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-3.2-instruct-78b")
40
- messages = [
41
- {"role": "user", "content": "Who are you?"},
42
- ]
43
- inputs = tokenizer.apply_chat_template(
44
- messages,
45
- add_generation_prompt=True,
46
- tokenize=True,
47
- return_dict=True,
48
- return_tensors="pt",
49
- ).to(model.device)
50
-
51
- outputs = model.generate(**inputs, max_new_tokens=40)
52
- print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
 
11
  <body>
12
  <div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl m-4">
13
  <div class="p-8">
14
+ <h1 class="text-2xl font-bold text-gray-800 mb-4">你好!欢迎来到静态空间</h1>
15
+ <p class="text-gray-600 mb-4">你可以直接编辑 <i class="font-mono">index.html</i> 文件来修改这个应用。</p>
16
+ <div class="flex items-center mb-4">
17
  <i data-feather="book" class="mr-2 text-blue-500"></i>
18
+ <a href="https://huggingface.co/docs/hub/spaces" target="_blank" class="text-blue-500 hover:underline">空间文档</a>
19
  </div>
20
+ <div class="flex items-center">
21
+ <i data-feather="globe" class="mr-2 text-green-500"></i>
22
+ <a href="about.html" class="text-green-500 hover:underline">关于我们</a>
23
+ </div>
24
+ </div>
25
  </div>
26
  <script>
27
  feather.replace();
28
  </script>
29
+ <div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl m-4">
30
+ <div class="p-8">
31
+ <h2 class="text-xl font-bold text-gray-800 mb-4">功能列表</h2>
32
+ <ul class="list-disc pl-5 text-gray-600">
33
+ <li class="mb-2">响应式设计</li>
34
+ <li class="mb-2">多语言支持</li>
35
+ <li class="mb-2">现代化UI</li>
36
+ </ul>
37
+ </div>
38
+ </div>
39
  </body>
40
  </html>
41
  # Use a pipeline as a high-level helper
 
47
  ]
48
  pipe(messages)
49
  # Load model directly
50
+ from transformers import AutoTokenizer, AutoModelForCaus