Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| #import torch | |
| #from transformers import pipeline | |
| #pipe = pipeline("text-generation", model="keyfan/grok-1-hf", trust_remote_code=True) | |
| #print(pipe("hello?")) | |
| this = gr.load("models/keyfan/grok-1-hf",cache_examples=False) | |
| print(this) | |
| def run_inf(inp): | |
| try: | |
| out=this(inp) | |
| except Exception as e: | |
| out=e | |
| return out | |
| with gr.Blocks() as app: | |
| inp_txt=gr.Textbox() | |
| btn=gr.Button() | |
| outp_txt=gr.Textbox() | |
| btn.click(run_inf,inp_txt,outp_txt) | |
| app.queue(default_concurrency_limit=10).launch() |