update to fix
Browse filesFiles changed (2)
- app.py-3
- app_huggingface.py+10-4
12334514 unmodified lines2021222425232425import gradio as gr
from app_huggingface import demo as demo_huggingfacefrom app_allenai import demo as demo_allenaifrom app_claude import demo as demo_claudefrom app_experimental import demo as demo_experimental14 unmodified linesfrom app_xai import demo as demo_grok
with gr.Blocks(fill_height=True) as demo: with gr.Tab("Hugging Face"): demo_huggingface.render() with gr.Tab("Grok"): demo_grok.render() with gr.Tab("Hyperbolic"):7 unmodified lines891011121112131415161718192026 unmodified lines47484945505152535415 unmodified lines70717267737 unmodified linesdef create_chat_fn(client): def chat(message, history): response = client.predict( message=message, image=None, message={"text": message, "files": []}, system_prompt="You are a helpful AI assistant.", temperature=0.7, max_new_tokens=1024, top_k=40, repetition_penalty=1.1, top_p=0.95, api_name="/chat" ) return response26 unmodified lines chat_interface = gr.ChatInterface( fn=safe_chat_fn, additional_inputs=[client] additional_inputs=[client], multimodal=True ) # Update client when model changes15 unmodified lines
demo = demo
demo.launch()app.py-3
app_huggingface.py+10-4