---
title: hawarma-preview
canonical_url: "https://www.modelscope.cn/studios/OhMyDearAI/hawarma-preview"
md_url: "https://www.modelscope.cn/studios/OhMyDearAI/hawarma-preview.md"
repository: OhMyDearAI/hawarma-preview
chinese_name: "HPMA哈威玛布局预览"
last_updated: 2026-03-04
sdk_type: gradio
sdk_version: 5.34.1
downloads: 0
stars: 68
---

# hawarma-preview

> hawarma-preview - OhMyDearAI 在 ModelScope 创建的在线 Demo。A handy app for previewing in-game layouts for Harry Potter: Magic Awakened's cooking mini-game. 这是一个用于预览HPMA中的烹饪游戏的布局的应用，根据用户输入的食谱，输出烹饪界面的食材、厨具、调味品的布局。

OhMyDearAI/hawarma-preview 是 ModelScope 魔搭社区上的在线可交互 Demo（创空间），基于 gradio 5.34.1 构建，中文名为「HPMA哈威玛布局预览」。

- **Repository**: OhMyDearAI/hawarma-preview
- **SDK**: gradio
- **SDK version**: 5.34.1
- **Downloads**: 0
- **Stars**: 68
- **Last updated**: 2026-03-04

Source: https://www.modelscope.cn/studios/OhMyDearAI/hawarma-preview

---

#### Clone with HTTP
```bash
 git clone https://www.modelscope.cn/studios/OhMyDearAI/hawarma-preview.git
```


This is an application for previewing the cooking game layout in HPMA (Harry Potter: Magic Awakened). Based on user input recipes, it outputs the layout of ingredients, cookers, and condiments for the cooking interface.

The program generates an ordered list from the 4 input recipes, passes them to corresponding functions, and gets result dictionaries for ingredients, cookers, and condiments, where keys are item names and values are position numbers. This data is organized and displayed as the result.

The results are displayed in two forms: one is JSON, and the other is a combined image (simulating the actual interface):
- On the left is the ingredients bar, where ingredients are arranged from left to right, bottom to top, with the order being the reverse of the selected recipe order (FILO), with a maximum of 2 elements per row;
- In the middle is the cookers bar, arranged from left to right, with a maximum of 4 elements;
- On the right is the condiments bar, where condiments are arranged from left to right, bottom to top, with the order being the same as the selected recipe order (FIFO), with a maximum of 2 elements per row. Each element is a PNG image with the corresponding name from the images directory.

If you need to add new recipes, you need to modify three parts:
- recipes.json: Add new recipe information
- translation.yaml: Add new recipe name translations
- images/: Create a directory with the same name as recipe.slug, and add PNG files with the same name as the new recipe slug for recipe selection (355x355 or 395x395), add files named "order-{recipe.slug}.png" for result display (275x255). If there are new ingredients, add PNG files with the same name (107x107), which need to correspond to the names in recipes.json.
New cookers and condiments are stored directly in the images/ directory for easy reuse.

If you modify the data structure of recipes.json, you also need to modify the corresponding parts of the Recipe class in app.py.
