Spaces:
Paused
Paused
Commit ·
d4ae7ba
1
Parent(s): ac00bbf
Delay creation of gradio client
Browse files21 unmodified lines222324252627285 unmodified lines3435363738394021 unmodified lines"ejschwartz/resym-fielddecoder", torch_dtype=torch.bfloat16).to("cuda")gradio_client = Client("https://ejschwartz-resym-field-helper.hf.space/")examples = [ex.encode().decode("unicode_escape") for ex in open("examples.txt", "r").readlines()5 unmodified lines# "output": "a1: a, os_reltime* -> sec, os_time_t\na1[1]: a, os_reltime* -> usec, os_time_t\na2: b, os_reltime* -> sec, os_time_t\na2[1]: b, os_reltime* -> usec, os_time_t",def field_prompt(code):try:field_helper_result = gradio_client.predict(decompiled_code=code,api_name="/predict",)21 unmodified lines222324252627285 unmodified lines3435363738394021 unmodified lines"ejschwartz/resym-fielddecoder", torch_dtype=torch.bfloat16).to("cuda")make_gradio_client = lambda: Client("https://ejschwartz-resym-field-helper.hf.space/")examples = [ex.encode().decode("unicode_escape") for ex in open("examples.txt", "r").readlines()5 unmodified lines# "output": "a1: a, os_reltime* -> sec, os_time_t\na1[1]: a, os_reltime* -> usec, os_time_t\na2: b, os_reltime* -> sec, os_time_t\na2[1]: b, os_reltime* -> usec, os_time_t",def field_prompt(code):try:field_helper_result = make_gradio_client().predict(decompiled_code=code,api_name="/predict",)
app.py+2-2