trial again
Browse files
app.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
def greet(input_text):
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
fn=greet,
|
| 8 |
inputs=gr.Textbox(label="Enter text"),
|
| 9 |
outputs="text",
|
| 10 |
-
title="
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import subprocess
|
| 3 |
|
| 4 |
def greet(input_text):
|
| 5 |
+
# Example call to a compiled llama.cpp binary (replace with real model path)
|
| 6 |
+
# subprocess.run(["./llama.cpp/main", "-m", "models/llama-7b.gguf", "-p", input_text])
|
| 7 |
+
return f"Llama.cpp would process: {input_text}"
|
| 8 |
|
| 9 |
+
demo = gr.Interface(
|
| 10 |
fn=greet,
|
| 11 |
inputs=gr.Textbox(label="Enter text"),
|
| 12 |
outputs="text",
|
| 13 |
+
title="Llama.cpp + Gradio Demo"
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
if __name__ == "__main__":
|
| 17 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|