hotchpotch commited on
Commit
c8da5d8
·
1 Parent(s): 62a4d35

Polish UI intro with links and emoji

Browse files
Files changed (2) hide show
  1. app.py +11 -9
  2. example_inputs.py +1 -1
app.py CHANGED
@@ -255,8 +255,9 @@ def build_interface() -> gr.Blocks:
255
  """
256
  ## Open Provence Context Pruner & Reranker
257
 
258
- This demo showcases the OpenProvence project, which applies the
259
- [Provence](https://arxiv.org/abs/2501.16214)
 
260
  approach to remove question-irrelevant context
261
  while simultaneously computing reranker scores.
262
  Modern AI agents and context-engineering pipelines often recurse through
@@ -266,21 +267,22 @@ def build_interface() -> gr.Blocks:
266
  we pass along only the evidence that matters before the LLM generates an answer.
267
 
268
  OpenProvence is trained on public datasets with fully open training and inference code,
269
- and the weights are released under the MIT License. See
270
- [OpenProvence](https://github.com/hotchpotch/open_provence) for project details.
271
 
272
- ### Demo Highlights
273
- - The 30M-parameter compact model supports both English and Japanese on CPU.
274
- It runs even faster on GPU.
275
- - Additional model families are available.
276
  Swap the model ID to try a different checkpoint.
 
 
277
  """
278
  )
279
 
280
  with gr.Accordion("Help (click to expand)", open=False):
281
  gr.Markdown(
282
  """
283
- - **Model**: Provide a local path or Hugging Face model ID
284
  that points to an OpenProvence checkpoint.
285
  - **threshold (recommend: 0.05-0.5)**: Range 0.00-1.00.
286
  Higher values prune more aggressively. Lower values favor recall.
 
255
  """
256
  ## Open Provence Context Pruner & Reranker
257
 
258
+ This demo showcases the
259
+ [OpenProvence](https://github.com/hotchpotch/open_provence)
260
+ project, which applies the [Provence](https://arxiv.org/abs/2501.16214)
261
  approach to remove question-irrelevant context
262
  while simultaneously computing reranker scores.
263
  Modern AI agents and context-engineering pipelines often recurse through
 
267
  we pass along only the evidence that matters before the LLM generates an answer.
268
 
269
  OpenProvence is trained on public datasets with fully open training and inference code,
270
+ and the weights are released under the MIT License.
 
271
 
272
+ ### Demo Highlights 🚀
273
+ - [30M-parameter compact model][hf-model] handles both English and Japanese on CPU --
274
+ lightning-fast on GPU.
275
+ - ⚙️ Additional model families are available.
276
  Swap the model ID to try a different checkpoint.
277
+
278
+ [hf-model]: https://huggingface.co/hotchpotch/open-provence-reranker-japanese-xsmall-v1
279
  """
280
  )
281
 
282
  with gr.Accordion("Help (click to expand)", open=False):
283
  gr.Markdown(
284
  """
285
+ - **Model** 🔗: Provide a local path or Hugging Face model ID
286
  that points to an OpenProvence checkpoint.
287
  - **threshold (recommend: 0.05-0.5)**: Range 0.00-1.00.
288
  Higher values prune more aggressively. Lower values favor recall.
example_inputs.py CHANGED
@@ -23,7 +23,7 @@ EXAMPLE_INPUTS: tuple[ExampleInput, ...] = (
23
  Japan is an island country in East Asia. Located in the Pacific Ocean off the northeast coast of the Asian mainland, it is bordered to the west by the Sea of Japan and extends from the Sea of Okhotsk in the north to the East China Sea in the south. The Japanese archipelago consists of four major islands alongside 14,121 smaller islands. Divided into 47 administrative prefectures and eight traditional regions, about 75% of the country's terrain is mountainous and heavily forested, concentrating its agriculture and highly urbanized population along its eastern coastal plains. With a population of over 123 million as of 2025, it is the 11th most populous country. The country's capital and largest city is Tokyo.
24
 
25
 
26
- The first known habitation of the archipelago dates to the Upper Paleolithic, with the beginning of the Japanese Paleolithic dating to c. 36,000 BC. Between the 4th and 6th centuries, its kingdoms were united under an emperor in Nara and later Heian-kyō. From the 12th century, actual power was held by military aristocrats known as shōgun and feudal lords called daimyō, enforced by warrior nobility named samurai. After rule by the Kamakura and Ashikaga shogunates and a century of warring states, Japan was unified in 1600 by the Tokugawa shogunate, which implemented an isolationist foreign policy. In 1853, an American fleet forced Japan to open trade to the West, which led to the end of the shogunate and the restoration of imperial power in 1868.
27
 
28
 
29
  In the Meiji period, Japan pursued rapid industrialization and modernization, as well as militarism and overseas colonization. The country annexed Korea in 1910, invaded China in 1937 and attacked the United States and European colonial powers in 1941, thus entering World War II as an Axis power. After being defeated in the Pacific War and suffering the U.S. atomic bombings of Hiroshima and Nagasaki, Japan surrendered in 1945 and came under Allied occupation. Afterwards, the country underwent rapid economic growth and became one of the five earliest major non-NATO allies of the U.S. Since the collapse of the Japanese asset price bubble in the early 1990s, it has experienced a prolonged period of economic stagnation referred to as the Lost Decades.
 
23
  Japan is an island country in East Asia. Located in the Pacific Ocean off the northeast coast of the Asian mainland, it is bordered to the west by the Sea of Japan and extends from the Sea of Okhotsk in the north to the East China Sea in the south. The Japanese archipelago consists of four major islands alongside 14,121 smaller islands. Divided into 47 administrative prefectures and eight traditional regions, about 75% of the country's terrain is mountainous and heavily forested, concentrating its agriculture and highly urbanized population along its eastern coastal plains. With a population of over 123 million as of 2025, it is the 11th most populous country. The country's capital and largest city is Tokyo.
24
 
25
 
26
+ The first known habitation of the archipelago dates to the Upper Paleolithic, with the beginning of the Japanese Paleolithic dating to c. 36,000 BC. Between the 4th and 6th centuries, its kingdoms were united under an emperor in Nara and later Heian-kyō. From the 12th century, actual power was held by military aristocrats known as shōgun and feudal lords called daimyō, enforced by warrior nobility named samurai. After rule by the Kamakura and Ashikaga shogunates and a century of warring states, Japan was unified in 1600 by the Tokugawa shogunate, which implemented an isolationist foreign policy. In 1853, an American fleet forced Japan to open trade to the West, which led to the end of the shogunate and the restoration of imperial power in 1868.
27
 
28
 
29
  In the Meiji period, Japan pursued rapid industrialization and modernization, as well as militarism and overseas colonization. The country annexed Korea in 1910, invaded China in 1937 and attacked the United States and European colonial powers in 1941, thus entering World War II as an Axis power. After being defeated in the Pacific War and suffering the U.S. atomic bombings of Hiroshima and Nagasaki, Japan surrendered in 1945 and came under Allied occupation. Afterwards, the country underwent rapid economic growth and became one of the five earliest major non-NATO allies of the U.S. Since the collapse of the Japanese asset price bubble in the early 1990s, it has experienced a prolonged period of economic stagnation referred to as the Lost Decades.