Spaces:
Sleeping
Sleeping
Commit
·
fc9ddd0
1
Parent(s):
93bd79b
rename
Browse files
app.py
CHANGED
|
@@ -34,15 +34,15 @@ Analyze the following IDA Hex Rays pseudocode and generate a valid JSON object c
|
|
| 34 |
"""
|
| 35 |
|
| 36 |
@spaces.GPU
|
| 37 |
-
def
|
| 38 |
# Prepare messages with system prompt
|
| 39 |
messages = [
|
| 40 |
{"role": "system", "content": system},
|
| 41 |
{"role": "user", "content": "Hello, how are you?"}
|
| 42 |
]
|
| 43 |
print(f"Test Tokenize: {tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)}")
|
| 44 |
-
return pipe(
|
| 45 |
|
| 46 |
-
demo = gr.Interface(fn=
|
| 47 |
description=frontmatter.load("README.md").content)
|
| 48 |
demo.launch()
|
|
|
|
| 34 |
"""
|
| 35 |
|
| 36 |
@spaces.GPU
|
| 37 |
+
def predict(code):
|
| 38 |
# Prepare messages with system prompt
|
| 39 |
messages = [
|
| 40 |
{"role": "system", "content": system},
|
| 41 |
{"role": "user", "content": "Hello, how are you?"}
|
| 42 |
]
|
| 43 |
print(f"Test Tokenize: {tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)}")
|
| 44 |
+
return pipe(code)
|
| 45 |
|
| 46 |
+
demo = gr.Interface(fn=predict, inputs="text", outputs="text",
|
| 47 |
description=frontmatter.load("README.md").content)
|
| 48 |
demo.launch()
|