Spaces:
Sleeping
Sleeping
File size: 577 Bytes
ef5cf7c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from llama_cpp import Llama
import gradio as gr
# Загружаем твою GGUF-модель (добавь файл модели в этот Space)
model = Llama(model_path="DeepSeek-R1-Distill-Text2SQL-OneEpoch-GGUF-q4.gguf")
def generate_sql(prompt):
result = model(prompt, max_tokens=256)
return result["choices"][0]["text"]
gr.Interface(
fn=generate_sql,
inputs="text",
outputs="text",
title="DeepSeek Text2SQL",
description="Вводи вопрос на естественном языке и получай SQL-запрос."
).launch()
|