Spaces:
Running
Running
feifeinoban
commited on
Commit
·
933ea3b
1
Parent(s):
5d326b7
Fix image path for Gradio rendering
Browse files
README.md
CHANGED
|
@@ -80,7 +80,7 @@ This replaces labor-intensive human labeling with **autonomous, human-aligned re
|
|
| 80 |
- At inference, **add vectors to internal activations** (e.g., Layer 18 of Llama 3.1) to guide behavior.
|
| 81 |
- **No fine-tuning needed**—works on closed-source models like GPT-5.
|
| 82 |
|
| 83 |
-
. Shell implements this full pipeline.*
|
| 86 |
|
|
|
|
| 80 |
- At inference, **add vectors to internal activations** (e.g., Layer 18 of Llama 3.1) to guide behavior.
|
| 81 |
- **No fine-tuning needed**—works on closed-source models like GPT-5.
|
| 82 |
|
| 83 |
+

|
| 84 |
|
| 85 |
> *Figure: The MENTOR framework (from paper). Shell implements this full pipeline.*
|
| 86 |
|
app.py
CHANGED
|
@@ -1,12 +1,4 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import os
|
| 3 |
-
|
| 4 |
-
# 调试:检查文件是否存在
|
| 5 |
-
print("当前目录内容:", os.listdir('.'))
|
| 6 |
-
if os.path.exists('assets'):
|
| 7 |
-
print("assets目录内容:", os.listdir('assets'))
|
| 8 |
-
else:
|
| 9 |
-
print("assets目录不存在")
|
| 10 |
|
| 11 |
def load_markdown():
|
| 12 |
with open("README.md", "r", encoding="utf-8") as f:
|
|
@@ -22,8 +14,5 @@ def load_markdown():
|
|
| 22 |
|
| 23 |
with gr.Blocks() as demo:
|
| 24 |
gr.Markdown(load_markdown())
|
| 25 |
-
# 测试直接显示图片
|
| 26 |
-
gr.HTML('<h3>测试图片显示:</h3>')
|
| 27 |
-
gr.HTML('<img src="/file=./assets/mentor_arch.png" style="max-width: 100%">')
|
| 28 |
|
| 29 |
-
demo.launch(
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def load_markdown():
|
| 4 |
with open("README.md", "r", encoding="utf-8") as f:
|
|
|
|
| 14 |
|
| 15 |
with gr.Blocks() as demo:
|
| 16 |
gr.Markdown(load_markdown())
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
demo.launch()
|