davidgaofc commited on
Commit
440c5de
1 Parent(s): 964d3aa
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -2,11 +2,14 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load your Hugging Face model
5
- model = pipeline('text-generation', model='gpt2') # Replace 'gpt2' with your model
 
 
 
6
 
7
  def predict(input_text):
8
  # Generate output using the model
9
- output = model(input_text, max_length=50) # Adjust parameters as needed
10
  return output[0]['generated_text']
11
 
12
  # Create the Gradio interface
 
2
  from transformers import pipeline
3
 
4
  # Load your Hugging Face model
5
+ # pipe = pipeline("text-classification", model="davidgaofc/TechDebtClassifier")
6
+ # Replace 'gpt2' with your model
7
+ def pipe(temp, temp2):
8
+ return temp
9
 
10
  def predict(input_text):
11
  # Generate output using the model
12
+ output = pipe(input_text, max_length=2000) # Adjust parameters as needed
13
  return output[0]['generated_text']
14
 
15
  # Create the Gradio interface