from peft import PeftModel, PeftConfig from transformers import AutoModelForCausalLM, AutoTokenizer import gradio as gr # config = PeftConfig.from_pretrained("Junity/Genshin-World-Model") # model = AutoModelForCausalLM.from_pretrained("baichuan-inc/Baichuan-13B-Base") # model = PeftModel.from_pretrained(model, "Junity/Genshin-World-Model") # tokenizer = AutoTokenizer.from_pretrained("Junity/Genshin-World-Model") with gr.Blocks() as demo: gr.Markdown( """ ## Genshin-World-Model - 模型地址 [https://huggingface.co/Junity/Genshin-World-Model](https://huggingface.co/Junity/Genshin-World-Model) - 此模型不支持要求对方回答什么,只支持续写。 """ ) demo.queue().launch()