Commit ·
ad05cee
1
Parent(s): 45283a3
comment generate for now
Browse files
main.py
CHANGED
|
@@ -40,13 +40,11 @@ def get_functions(file):
|
|
| 40 |
# pipe = pipeline(model="ejschwartz/decaf-v1-22b-4bit", return_full_text=False)
|
| 41 |
# pipe.model.to("cuda")
|
| 42 |
|
| 43 |
-
def generate(text):
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
-
#demo = gr.Interface(fn=generate, inputs="text", outputs="text")
|
| 49 |
-
#demo.launch()
|
| 50 |
|
| 51 |
with gr.Blocks() as demo:
|
| 52 |
|
|
@@ -100,10 +98,6 @@ TBD
|
|
| 100 |
label="Model Output",
|
| 101 |
#min_width=400
|
| 102 |
)
|
| 103 |
-
# with gr.Column():
|
| 104 |
-
# clazz = gr.Label()
|
| 105 |
-
# interpret_button = gr.Button("Interpret (very slow)")
|
| 106 |
-
# interpretation = gr.components.Interpretation(disassembly)
|
| 107 |
|
| 108 |
example_widget = gr.Examples(
|
| 109 |
examples=[f.path for f in os.scandir(os.path.join(os.path.dirname(__file__), "examples"))],
|
|
|
|
| 40 |
# pipe = pipeline(model="ejschwartz/decaf-v1-22b-4bit", return_full_text=False)
|
| 41 |
# pipe.model.to("cuda")
|
| 42 |
|
| 43 |
+
# def generate(text):
|
| 44 |
+
# print(f"Generating text... {text}")
|
| 45 |
+
# prompt = decomp_create_prompt(text)
|
| 46 |
+
# return pipe(prompt, max_new_tokens=2000)[0]['generated_text']
|
| 47 |
|
|
|
|
|
|
|
| 48 |
|
| 49 |
with gr.Blocks() as demo:
|
| 50 |
|
|
|
|
| 98 |
label="Model Output",
|
| 99 |
#min_width=400
|
| 100 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
example_widget = gr.Examples(
|
| 103 |
examples=[f.path for f in os.scandir(os.path.join(os.path.dirname(__file__), "examples"))],
|