yokeshd commited on
Commit
2e8b356
1 Parent(s): 99688b7

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py DELETED
@@ -1,15 +0,0 @@
1
- import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
3
-
4
- model_name = "Qwen/Qwen2.5-Coder-32B"
5
- tokenizer = AutoTokenizer.from_pretrained(model_name)
6
- model = AutoModelForCausalLM.from_pretrained(model_name)
7
-
8
- def generate_response(input_text):
9
- inputs = tokenizer(input_text, return_tensors="pt")
10
- outputs = model.generate(**inputs)
11
- response = tokenizer.decode(outputs[0], skip_special_tokens=True)
12
- return response
13
-
14
- iface = gr.Interface(fn=generate_response, inputs="text", outputs="text")
15
- iface.launch()