kevinpro commited on
Commit
d1485a4
·
verified ·
1 Parent(s): f0def04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -9,7 +9,7 @@ import torch
9
  # 假设openai_client已定义,例如:
10
 
11
  device = "cuda"
12
- MODEL_NAME = "ByteDance-Seed/Seed-X-PPO-7B"
13
 
14
  print("Start dowload")
15
  def load_model():
@@ -47,18 +47,6 @@ def _translate(text: str):
47
  print(full_output)
48
  return full_output
49
 
50
- # def _translate(text: str, src_lang: str, tgt_lang: str):
51
- # prompt = f"Translate the following text from {src_lang} to {tgt_lang}. Direct output translation result without any explaination:\n\n{text}"
52
- # key=os.getenv('key')
53
- # openai_client = openai.OpenAI(base_url="https://ssapi.cppbear.site/v1", api_key=key)
54
- # response = openai_client.chat.completions.create(
55
- # model="tbai.xin-dpsk-deepseek-v3", # 如gpt-3.5-turbo或其他兼容模型
56
- # messages=[{"role": "user", "content": prompt}],
57
- # max_tokens=30240,
58
- # temperature=0.0
59
- # )
60
- # print(response)
61
- # return response.choices[0].message.content.strip()
62
 
63
 
64
  description = """
@@ -69,7 +57,7 @@ description = """
69
  Seed-X, a powerful series of open-source multilingual translation language models, including an instruction model, a reinforcement learning model, and a reward model. It pushes the boundaries of translation capabilities within 7 billion parameters. We develop Seed-X as an accessible, off-the-shelf tool to support the community in advancing translation research and applications:
70
  """
71
 
72
- examples_inputs = [["<s>Translate the following English sentence into Chinese:\nMay the force be with you <zh>"]]
73
 
74
  with gr.Blocks() as demo:
75
  gr.Markdown(description)
 
9
  # 假设openai_client已定义,例如:
10
 
11
  device = "cuda"
12
+ MODEL_NAME = "kevinpro/R-PRM-7B-DPO"
13
 
14
  print("Start dowload")
15
  def load_model():
 
47
  print(full_output)
48
  return full_output
49
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
 
52
  description = """
 
57
  Seed-X, a powerful series of open-source multilingual translation language models, including an instruction model, a reinforcement learning model, and a reward model. It pushes the boundaries of translation capabilities within 7 billion parameters. We develop Seed-X as an accessible, off-the-shelf tool to support the community in advancing translation research and applications:
58
  """
59
 
60
+ examples_inputs = [["test"]]
61
 
62
  with gr.Blocks() as demo:
63
  gr.Markdown(description)