Spaces:
Sleeping
Sleeping
davidgaofc
commited on
Commit
•
440c5de
1
Parent(s):
964d3aa
try again
Browse files
app.py
CHANGED
@@ -2,11 +2,14 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Load your Hugging Face model
|
5 |
-
|
|
|
|
|
|
|
6 |
|
7 |
def predict(input_text):
|
8 |
# Generate output using the model
|
9 |
-
output =
|
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
|