Dhahlan2000 commited on
Commit
a63ae46
·
verified ·
1 Parent(s): 032433c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -62,12 +62,12 @@ def transliterate_to_sinhala(text):
62
  # device_map="auto",
63
  # )
64
 
65
- pipe1 = pipeline("text-generation", model="unsloth/gemma-2b-it")
66
 
67
- # client = InferenceClient("google/gemma-2b-it")
68
 
69
  # def conversation_predict(text):
70
- # return client.text_generation(text, return_full_text=False)
71
  # pipe = pipeline(
72
  # "text-generation",
73
  # model=model,
@@ -135,8 +135,8 @@ def respond(
135
 
136
  messages.append({"role": "user", "content": message})
137
 
138
- # response = ai_predicted(message)
139
- response = pipe1({"role": "user", "content": message})
140
 
141
  yield response
142
 
 
62
  # device_map="auto",
63
  # )
64
 
65
+ # pipe1 = pipeline("text-generation", model="unsloth/gemma-2b-it")
66
 
67
+ client = InferenceClient("google/gemma-2b-it")
68
 
69
  # def conversation_predict(text):
70
+ return client.text_generation(text, return_full_text=False)
71
  # pipe = pipeline(
72
  # "text-generation",
73
  # model=model,
 
135
 
136
  messages.append({"role": "user", "content": message})
137
 
138
+ response = ai_predicted(message)
139
+ # response = pipe1({"role": "user", "content": message})
140
 
141
  yield response
142