Spaces:
Sleeping
Sleeping
Commit ·
9405ec1
1
Parent(s): 59f483d
lets gui
Browse filesFiles changed (2)
- app.py+25-7
- data/config.jsonAdded+28
1234567891029 unmodified lines40414243444546474849505152import gradio as grfrom huggingface_hub import InferenceClient"""For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference"""client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")def respond(29 unmodified linesyield response"""For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface"""demo = gr.ChatInterface(respond,additional_inputs=[gr.Textbox(value="You are a friendly Chatbot.", label="System message"),gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),gr.Slider(1234567891011121314151617181920212223242526272829303129 unmodified lines61626364656667686970import gradio as grimport jsonfrom datetime import datetimefrom huggingface_hub import InferenceClientnow = datetime.now()with open("data/config.json", "r", encoding="UTF-8") as file:config = json.load(file)client = InferenceClient(model="meta-llama/Llama-3.2-3B-Instruct")rules = f"""# INFORMAÇÕES GERAIS: (hoje é {now.strftime("%d/%m/%Y %H:%M:%S")},# VOCÊ FOI CRIADO PELO GRUPO Last, O SEU NOME É 'GUI',# ESTAS SÃO SUAS CONFIGURAÇÕES E REGRAS: {config},# SUAS RESPOSTAS DEVEM SER SARCASTICAMENTE DIVERTIDAS :),"""def respond(29 unmodified linesyield responsedemo = gr.ChatInterface(respond,additional_inputs=[gr.Textbox(value=rules, label="System message"),gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),gr.Slider(
12345678910111213141516171819202122232425262728{ "config": { "name": "Gui", "version": 3.0, "developers LAST": { "wendellast": { "name": "wendellast", "function": "geral devloper", "profile": "https://github.com/wendellast" }, "contri": [ { "name": "LuyysHenriqueKuromi", "function": "Translate components to English", "profile": "https://github.com/LuyysHenriqueKuromi" }, { "name": "Andra-sun", "function": "designer devloper", "profile": "https://github.com/Andra-sun" } ] } }, "data_created": "31/12/2023", "country":"Brasil", "status": "active" }app.py+25-7
data/config.jsonAdded+28