billingsmoore Claude Sonnet 5 commited on
Commit
c75b0b8
·
1 Parent(s): 36fc86c

Add usage explanation to top of app, covering local vs OpenRouter model choice

Browse files

Explains the upload -> segment -> translate -> edit -> download workflow and
clarifies the tradeoff between the default local CPU model (free, no prompt
support, lower quality) and OpenRouter (paid, prompt-driven, higher quality).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +15 -7
app.py CHANGED
@@ -29,7 +29,21 @@ def build_app() -> gr.Blocks:
29
  with gr.Blocks(title="SimpleTranslationUI") as demo:
30
  app_state = gr.State(_make_state())
31
 
32
- gr.Markdown("# SimpleTranslationUI\nTibetan Buddhist Translation Editor")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  with gr.Row():
35
  source_input = gr.File(
@@ -43,12 +57,6 @@ def build_app() -> gr.Blocks:
43
  scale=1,
44
  )
45
 
46
- gr.Markdown(
47
- "Upload a plain text file, Word document, or PDF. It's automatically split into "
48
- "segments (by paragraph, then by sentence-ending shad marks or whitespace for long "
49
- "paragraphs) so each piece gets one translation call."
50
- )
51
-
52
  with gr.Accordion("Settings", open=False):
53
  with gr.Row():
54
  openrouter_api_key = gr.Textbox(
 
29
  with gr.Blocks(title="SimpleTranslationUI") as demo:
30
  app_state = gr.State(_make_state())
31
 
32
+ gr.Markdown(
33
+ "# SimpleTranslationUI\nTibetan Buddhist Translation Editor\n\n"
34
+ "**How to use:** Upload a source document below — it's automatically split into "
35
+ "segments (by paragraph, then by sentence-ending shad marks or whitespace for long "
36
+ "paragraphs). Click **Translate All** to translate every segment, or translate one "
37
+ "segment at a time with its own **Translate** button. Edit any translation inline, "
38
+ "then **Download** the result as text, Word, or JSON.\n\n"
39
+ "**Choosing a model:** By default (no API key) translation runs on a **local CPU "
40
+ "model** (`billingsmoore/mlotsawa-ground-base`) — free, runs on this machine, but a "
41
+ "plain seq2seq model with no instruction-following (it ignores the translation "
42
+ "prompt below) and lower translation quality. For higher-quality, instruction-"
43
+ "following translation, add an **OpenRouter API key** in Settings and pick a model "
44
+ "from the dropdown — this calls OpenRouter's API (usage is billed to your OpenRouter "
45
+ "account) and uses the editable translation prompt."
46
+ )
47
 
48
  with gr.Row():
49
  source_input = gr.File(
 
57
  scale=1,
58
  )
59
 
 
 
 
 
 
 
60
  with gr.Accordion("Settings", open=False):
61
  with gr.Row():
62
  openrouter_api_key = gr.Textbox(