changed to Open BMB model, changed bard stats to an accordion, updated tags.
Browse files
README.md
CHANGED
|
@@ -12,4 +12,12 @@ license: apache-2.0
|
|
| 12 |
short_description: For when tabletop RPG player ask "who's that?"
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
short_description: For when tabletop RPG player ask "who's that?"
|
| 13 |
---
|
| 14 |
|
| 15 |
+
Model used is openbmb/MiniCPM5-1B-Base
|
| 16 |
+
|
| 17 |
+
@article{minicpm4,
|
| 18 |
+
title={Minicpm4: Ultra-efficient llms on end devices},
|
| 19 |
+
author={MiniCPM, Team},
|
| 20 |
+
journal={arXiv preprint arXiv:2506.07900},
|
| 21 |
+
year={2025}
|
| 22 |
+
}
|
| 23 |
+
|
app.py
CHANGED
|
@@ -12,7 +12,7 @@ DATA_DIR = os.path.join(os.getcwd(), "session_data")
|
|
| 12 |
os.makedirs(DATA_DIR, exist_ok=True)
|
| 13 |
csv_path = None
|
| 14 |
|
| 15 |
-
pipe = pipeline("text-generation", model="
|
| 16 |
|
| 17 |
DESC_SYSTEM_PROMPT = (
|
| 18 |
"Write a description of a fantasy character based on the user prompt"
|
|
@@ -325,7 +325,7 @@ def get_csv_file(state):
|
|
| 325 |
with gr.Blocks() as demo:
|
| 326 |
title = gr.HTML("<center><h1>NPC Generator</h1></center>")
|
| 327 |
description = gr.HTML("<center>For tabletop GMs when players ask for a description of random people in the tavern.</center>")
|
| 328 |
-
tags = gr.HTML("<center>| Backyard AI |</center>")
|
| 329 |
|
| 330 |
with gr.Row(equal_height = True):
|
| 331 |
with gr.Column(scale = 2):
|
|
@@ -355,9 +355,10 @@ with gr.Blocks() as demo:
|
|
| 355 |
hp_box = gr.Textbox(value = "", label = "HP", interactive = False)
|
| 356 |
speed_box = gr.Textbox(value = "", label = "Speed", interactive = False)
|
| 357 |
bard_stats = gr.HTML("~~Bard Stats~~")
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
|
|
|
| 361 |
|
| 362 |
btn.click(
|
| 363 |
fn=generate_character,
|
|
|
|
| 12 |
os.makedirs(DATA_DIR, exist_ok=True)
|
| 13 |
csv_path = None
|
| 14 |
|
| 15 |
+
pipe = pipeline("text-generation", model="openbmb/MiniCPM5-1B-Base")
|
| 16 |
|
| 17 |
DESC_SYSTEM_PROMPT = (
|
| 18 |
"Write a description of a fantasy character based on the user prompt"
|
|
|
|
| 325 |
with gr.Blocks() as demo:
|
| 326 |
title = gr.HTML("<center><h1>NPC Generator</h1></center>")
|
| 327 |
description = gr.HTML("<center>For tabletop GMs when players ask for a description of random people in the tavern.</center>")
|
| 328 |
+
tags = gr.HTML("<center>| Backyard AI | Open BMB |</center>")
|
| 329 |
|
| 330 |
with gr.Row(equal_height = True):
|
| 331 |
with gr.Column(scale = 2):
|
|
|
|
| 355 |
hp_box = gr.Textbox(value = "", label = "HP", interactive = False)
|
| 356 |
speed_box = gr.Textbox(value = "", label = "Speed", interactive = False)
|
| 357 |
bard_stats = gr.HTML("~~Bard Stats~~")
|
| 358 |
+
with gr.Accordion():
|
| 359 |
+
dcs = gr.Textbox(value = "", label = "DC to Charm")
|
| 360 |
+
prefs = gr.Textbox(value = "", label = "Advantage if:")
|
| 361 |
+
icks = gr.Textbox(value = "", label = "Disdvantage if:")
|
| 362 |
|
| 363 |
btn.click(
|
| 364 |
fn=generate_character,
|